Integer with range limitations handled incorrectly on Oracle
Description
Environment
Version used is 2.0-rc2-SNAPSHOT
Activity
Show:
Nathan Voxland August 15, 2013 at 9:18 PM
Fixed

Nathan Voxland July 22, 2013 at 4:11 PM
I haven't gotten to look at it yet for 3.0.3, but it is on the short list
of what I'm planning to put into 3.0.3. I'll change the status to "closed"
when it has been fixed.
Nathan
On Sun, Jul 21, 2013 at 8:06 AM, Yagnesh Chawda (JIRA) <

Yagnesh Chawda July 21, 2013 at 1:05 PMEdited
Hi,
Has it been fixed in 3.0.3 or planned to fix it soon? I took the source code from master and build it. Its still giving me same error. Please suggest.

Yagnesh Chawda July 19, 2013 at 1:14 PMEdited
Hi,
Me too facing the same issue. I reverse engineered my Changeset from existing table in MySQL database. It works fine with MySQL and MS-SQL server 2012. But facing issue with Oracle 11g. This must to be very common issue faced by many. Please fix it asap.
I am using Liquibase 3.0.2

Pas Filip February 3, 2011 at 4:14 PM
Just guessing the assignee...
When I create a table using an integer as datatpye and specifying a precision fails on Oracle.
<createTable tableName="TEST_TABLE">
<column name="TEST_TABLE_PK" type="INTEGER(9)" autoIncrement="true">
<constraints primaryKey="true" primaryKeyName="PK_TEST_TABLE"/>
</column>
</createTable>
Works fine on MySql database but gives problems for oracle.
I thought of using a numeric(9,0) or a decimal(9,0) but there is no support for auto-increment on MySql for those datatypes..
On oracle it generates the following sql:
CREATE TABLE TEST_TABLE (
TEST_TABLE_PK INTEGER(9) NOT NULL,
CONSTRAINT PK_TEST_TABLE PRIMARY KEY (TEST_TABLE_PK)
)
When executed on Oracle I get the following error:
ORA-00907: missing right parenthesis
SQLState: 42000
ErrorCode: 907
Can you update liquibase to remove any precision on an INTEGER when running on Oracle so the statement that would be generated is:
CREATE TABLE TEST_TABLE (
TEST_TABLE_PK INTEGER NOT NULL,
CONSTRAINT PK_TEST_TABLE PRIMARY KEY (TEST_TABLE_PK)
)
Alternatively maybe translate an INTEGER(9) into a Oracle NUMERIC(9,0) which would result in:
CREATE TABLE TEST_TABLE (
TEST_TABLE_PK NUMERIC(9,0) NOT NULL,
CONSTRAINT PK_TEST_TABLE PRIMARY KEY (TEST_TABLE_PK)
)