|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Drop column which has foreign key on itLiquibase doesn't work with the change log generated from MSSQL databases for followed changes.
One change is to drop a column which has a foreign key on it. The change log generated by DIFF likes this: <changeSet author="alan (generated)" id="1216106192953-11"> <dropColumn columnName="DataCreateUser" tableName="EafRole"/> </changeSet> ... <changeSet author="alan (generated)" id="1216106192953-31"> <dropForeignKeyConstraint baseTableName="EafRole" constraintName="FK75B85FB1375064CA"/> </changeSet> MSSQL rejects dropping this column because the foreign key constraint exists. And, the another change is addNotNullConstraint. The changeSet generated by DIFF likes this: <changeSet author="alan (generated)" id="1216106192953-18"> <addNotNullConstraint columnName="Name" defaultNullValue="" tableName="EafUser"/> </changeSet> MSSQL rejects the empty defaultNullValue and need a dataColumnType. Is there anything wrong while I generate the change log? I love liquibase so much and want to employ it in my team's DB processes. I will really appreciate your help! Terry |
|
|
Re: Drop column which has foreign key on itIt looks like a couple bugs in the change log generator. I'll look into
it more for 1.8, but for now you should be able to just move the changeSets around and add the missing attributes as needed to get it working. Nathan -----Original Message----- From: liquibase-user-bounces@... [mailto:liquibase-user-bounces@...] On Behalf Of itrust Sent: Tuesday, July 15, 2008 2:49 AM To: liquibase-user@... Subject: [Liquibase-user] Drop column which has foreign key on it Liquibase doesn't work with the change log generated from MSSQL databases for followed changes. One change is to drop a column which has a foreign key on it. The change log generated by DIFF likes this: <changeSet author="alan (generated)" id="1216106192953-11"> <dropColumn columnName="DataCreateUser" tableName="EafRole"/> </changeSet> ... <changeSet author="alan (generated)" id="1216106192953-31"> <dropForeignKeyConstraint baseTableName="EafRole" constraintName="FK75B85FB1375064CA"/> </changeSet> MSSQL rejects dropping this column because the foreign key constraint exists. And, the another change is addNotNullConstraint. The changeSet generated by DIFF likes this: <changeSet author="alan (generated)" id="1216106192953-18"> <addNotNullConstraint columnName="Name" defaultNullValue="" tableName="EafUser"/> </changeSet> MSSQL rejects the empty defaultNullValue and need a dataColumnType. Is there anything wrong while I generate the change log? I love liquibase so much and want to employ it in my team's DB processes. I will really appreciate your help! Terry -- View this message in context: http://www.nabble.com/Drop-column-which-has-foreign-key-on-it-tp18459767 p18459767.html Sent from the LiquiBase - User mailing list archive at Nabble.com. ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Liquibase-user mailing list Liquibase-user@... https://lists.sourceforge.net/lists/listinfo/liquibase-user ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Liquibase-user mailing list Liquibase-user@... https://lists.sourceforge.net/lists/listinfo/liquibase-user |
| Free embeddable forum powered by Nabble | Forum Help |