Hello,
I have the following changeLog, which is run against a MySQL 5.5 instance, on a schema named "const"
- <databaseChangeLog
- xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
- xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd
- http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
- <changeSet id="1" author="nvoxland">
- <createTable tableName="person">
- <column name="id" type="int" autoIncrement="true">
- <constraints primaryKey="true" nullable="false"/>
- </column>
- </createTable>
- <createTable tableName="car">
- <column name="id" type="int" autoIncrement="true">
- <constraints primaryKey="true" nullable="false"/>
- </column>
- <column name="carOwner" type="int">
- <constraints foreignKeyName="other_table_fk" references="person(id)" nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet id="2" author="batz">
- <dropAllForeignKeyConstraints baseTableName="car" />
- </changeSet>
- </databaseChangeLog>
When I run this changeSet using "update", the foreign key doesn't get removed. When I run it in two steps (by commenting out the second changeSet during the first run), it works as expected.
Is this the designed behavior? What do I need to do to have the second changeSet?
Thanks,
Nadav
Nadav