Issue 169 in flyway: Specify default tablespace for oracle

228 views
Skip to first unread message

fly...@googlecode.com

unread,
Oct 11, 2011, 11:41:02 AM10/11/11
to flywa...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 169 by KrisMul...@gmail.com: Specify default tablespace for oracle
http://code.google.com/p/flyway/issues/detail?id=169

I would like to be able to specify a tablespace name from the config for
where the schema_version table will be created, is this a possible
enhancement?

i.e.

CREATE TABLE ${schema}.${table} (
version VARCHAR2(20) NOT NULL PRIMARY KEY,
description VARCHAR2(100),
type VARCHAR2(10) NOT NULL,
script VARCHAR2(200) NOT NULL UNIQUE,
checksum INT,
installed_by VARCHAR2(30) NOT NULL,
installed_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
execution_time INT,
state VARCHAR2(15) NOT NULL,
current_version NUMBER(1) NOT NULL
) TABLESPACE ${tablespace};

CREATE INDEX ${schema}.${table}_cv_idx ON ${schema}.${table}
(current_version);

fly...@googlecode.com

unread,
Oct 11, 2011, 11:45:05 AM10/11/11
to flywa...@googlegroups.com

Comment #1 on issue 169 by KrisMul...@gmail.com: Specify default tablespace
for oracle
http://code.google.com/p/flyway/issues/detail?id=169

Reason being, i ran into the issue where the user's default tablespace no
longer existed, Caused by: liquibase.exception.DatabaseException: Error
executing SQL CREATE TABLE DATABASECHANGELOGLOCK (ID INTEGER NOT NULL,
LOCKED NUMBER(1) NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR2(255),
CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on JDBCSTUFFHERE
tablespace 'MISC_DATA_2' does not exist.

My migrations specify the tablespace but the schema_version thats created
does not, to get around this I had to create the changeloglock table myself
(now I know it could also be fixed with alter user, but I could see this as
being useful to others possibly...)

fly...@googlecode.com

unread,
Oct 11, 2011, 11:49:15 AM10/11/11
to flywa...@googlegroups.com

Comment #2 on issue 169 by KrisMul...@gmail.com: Specify default tablespace
for oracle
http://code.google.com/p/flyway/issues/detail?id=169

[INFO] Flyway Error: com.googlecode.flyway.core.exception.FlywayException:
Error
executing statement at line 17: CREATE TABLE SCHEMA.schema_version (


version VARCHAR2(20) NOT NULL PRIMARY KEY,
description VARCHAR2(100),
type VARCHAR2(10) NOT NULL,
script VARCHAR2(200) NOT NULL UNIQUE,
checksum INT,
installed_by VARCHAR2(30) NOT NULL,
installed_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
execution_time INT,
state VARCHAR2(15) NOT NULL,
current_version NUMBER(1) NOT NULL
)

ORA-00959: tablespace 'MISC_DATA_2' does not exist

fly...@googlecode.com

unread,
Oct 13, 2011, 4:57:04 AM10/13/11
to flywa...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Enhancement

Comment #3 on issue 169 by axel.fontai...@gmail.com: Specify

Hi Kris,

thanks for your suggestion! We'll look into it as a possible improvement
for a future release.

Cheers,
Axel

fly...@googlecode.com

unread,
Dec 20, 2011, 8:42:18 PM12/20/11
to flywa...@googlegroups.com

Comment #4 on issue 169 by a...@baezaconsulting.com: Specify default

Couldn't you just connect to the database with a user that has the default
tablespace that you want? You can then use this user as a deploy user for
the schemas that you plan on controlling via flyway.

fly...@googlecode.com

unread,
Sep 10, 2012, 6:03:24 AM9/10/12
to flywa...@googlegroups.com

Comment #5 on issue 169 by stund...@gmail.com: Specify default tablespace
for oracle
http://code.google.com/p/flyway/issues/detail?id=169

Hi,

i'm using the possibility to specify the tablespace for the schema table
too. Is there a workaround or solution for this task?

Regards
Steffen..

fly...@googlecode.com

unread,
Sep 11, 2012, 10:33:50 AM9/11/12
to flywa...@googlegroups.com
Updates:
Labels: Database-Oracle Component-Core

Comment #6 on issue 169 by axel.fontai...@gmail.com: Specify
Hi Steffen,

there are two workarounds:
- create the table yourself in the tablespace you want
- connect with a user that has the desired tablespace as its default

Cheers
Axel

fly...@googlecode.com

unread,
Jun 25, 2013, 7:47:20 AM6/25/13
to flywa...@googlegroups.com
Updates:
Status: Migrated

Comment #7 on issue 169 by axel.fontai...@gmail.com: Specify
Migrated to GitHub: https://github.com/flyway/flyway/issues/98

To everyone who starred this issue: please leave a +1 comment on the linked
GitHub issue

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages