New Topic: Problem with H2 and changing NULLS (dropNotNullConstraint/addNotNullConstraint)

View: New views
1 Messages — Rating Filter:   Alert me  

New Topic: Problem with H2 and changing NULLS (dropNotNullConstraint/addNotNullConstraint)

by LiquiBase Community Forum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A new topic, 'Problem with H2 and  changing NULLS (dropNotNullConstraint/addNotNullConstraint)', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=194.new#new

The text of the topic is shown below:

When I use a changset like the following with H2 and any of the 1.9X versions of Liquibase

    <changeSet id="2009-03-18" author="foo" >
        <dropNotNullConstraint tableName="TEST" columnName="TEST_COLUMN" schemaName="TEST_SCHEMA"/>
    </changeSet>

When I do an updateSQL I get the following
ALTER TABLE TEST_SCHEMA.TEST ALTER COLUMN  `TEST_COLUMN` null NULL;

which doesn't work as it really needs to be
ALTER TABLE TEST_SCHEMA.TEST ALTER COLUMN  `TEST_COLUMN` set NULL;

Also the following
    <changeSet id="2009-03-19" author="foo" >
        <addNotNullConstraint tableName="TEST" schemaName="TEST_SCHEMA" columnName="TEST2_COLUMN" defaultNullValue="FOO"/>
    </changeSet>

produced
ALTER TABLE TEST_SCHEMA.TEST ALTER COLUMN  `TEST2_COLUMN` null NOT NULL;

when what is required is
ALTER TABLE TEST_SCHEMA.TEST ALTER COLUMN  `TEST2_COLUMN` set NOT NULL;

These changesets work fine with Oracle so I assume it's an issue with the H2 sql generation

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The LiquiBase Community Forum Team.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Liquibase-user mailing list
Liquibase-user@...
https://lists.sourceforge.net/lists/listinfo/liquibase-user