Informix issues

Hello,

I’m having some issues with informix version 11.50 across Liquibase 3.0.8 and 3.1.1.
I used 3.1.1 to generate a changelog ok, but doing an update fails due to this bug: https://liquibase.jira.com/browse/CORE-209
So, I went down to version 3.0.8, where I’m having other problems doing an update.
All these are with the changelog generated from the working database, where I am applying (via update) to a clean database.

1. Auto-increment (autoIncrement=“true”) isn’t handled for SERIAL8 datatype (doesn’t seem to effect SERIAL as well?)
Here is the error message and logs:

Liquibase update Failed: Unknown property autoIncrement for liquibase.datatype.core.UnknownType SERIAL8(19)

SEVERE 28/02/14 5:34 PM:liquibase: ./changelog.xml::1393397606442-110::ms (generated): Unknown property autoIncrement for liquibase.datatype.core.UnknownType SERIAL8(19)
java.lang.RuntimeException: Unknown property autoIncrement for liquibase.datatype.core.UnknownType SERIAL8(19)
        at liquibase.datatype.DataTypeFactory.fromDescription(DataTypeFactory.java:167)
        at liquibase.change.core.CreateTableChange.generateStatements(CreateTableChange.java:65)
        at liquibase.change.AbstractChange.generateStatementsVolatile(AbstractChange.java:245)
        at liquibase.change.AbstractChange.warn(AbstractChange.java:305)
        at liquibase.changelog.visitor.ValidatingVisitor.visit(ValidatingVisitor.java:89)
        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:64)
        at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:147)
        at liquibase.Liquibase.update(Liquibase.java:134)
        at liquibase.integration.commandline.Main.doMigration(Main.java:864)
        at liquibase.integration.commandline.Main.main(Main.java:133)

2. Several column data types are not generated properly:
INT(10) gives invalid syntax error
SMALLINT(5) gives invalid syntax error

Also there is an issue with the datetime datatype, the fraction is (3) in the original db but in the changelog it is (5) and this is SQL generated:
cts DATETIME YEAR TO FRACTION(5) DEFAULT current NOT NULL
This fails with (5) but is fine with the (3) that it should be.

3. Liquibase 3.0.8 also has an issue trying to re-create the liquibase database tables all the time. I have to delete them from the database each time I attempt the update or it fails before doing anything.
Here is the log from where I didn’t delete the liquibase tables and hit the issue which is repeatable:

DEBUG 28/02/14 5:25 PM:liquibase: Connected to informix@jdbc:informix-sqli://localhost:1301:INFORMIXSERVER=ids_test;database=liquibase
DEBUG 28/02/14 5:25 PM:liquibase: Setting auto commit to false from true
DEBUG 28/02/14 5:25 PM:liquibase: Executing EXECUTE database command: EXECUTE PROCEDURE IFX_ALLOW_NEWLINE(‘T’);
DEBUG 28/02/14 5:25 PM:liquibase: Create Database Lock Table
DEBUG 28/02/14 5:25 PM:liquibase: Executing EXECUTE database command: CREATE TABLE “test”.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED DATETIME YEAR TO FRACTION(5), LOCKEDBY VARCHAR(255), PRIMARY KEY (ID))
SEVERE 28/02/14 5:25 PM:liquibase: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE “test”.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED DATETIME YEAR TO FRACTION(5), LOCKEDBY VARCHAR(255), PRIMARY KEY (ID)): Table (test.databasechangeloglock) already exists in database.


Thanks for reporting the problems. I created https://liquibase.jira.com/browse/CORE-1797 and https://liquibase.jira.com/browse/CORE-1798 and https://liquibase.jira.com/browse/CORE-1799 to track the fixes and will try to get them into 3.2.0.


Nathan

Hi Nathan,

Thank you for taking a look at these issues.
Is there an ETA for when version 3.2.0 might come out?

Thanks.

I don’t have a firm ETA for 3.2 yet, I’ve been sidetracked with improvements to testing and multi-schema support. I’m hoping for a 3.2.0 release in late April to early May.


Nathan

Hi Nathan,

I had some further issues with the Informix support and I decided the fastest way for us to be able to use Liquibase was to fix them myself.

I set up a pull request here: https://github.com/liquibase/liquibase/pull/314
It’s my first time using GitHub and making a pull request, so if there’s any issues please let me know on the thread here or via GitHub.

I got your pull request, and thanks for doing the work. They are definitely the easiest way to get a fix in.

Nathan