Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Liquibase 2.0.5 does not seem to commit between changesets against MySQL 5.5

$
0
0
Hello, 

I have the following changeLog, which is run against a MySQL 5.5 instance, on a schema named "const"

  1. <databaseChangeLog
  2.         xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.         xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
  5.         xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd
  6.         http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">


  7.     <changeSet id="1" author="nvoxland">
  8.         <createTable tableName="person">
  9.             <column name="id" type="int" autoIncrement="true">
  10.                 <constraints primaryKey="true" nullable="false"/>
  11.             </column>
  12.         </createTable>
  13.         <createTable tableName="car">
  14.             <column name="id" type="int" autoIncrement="true">
  15.                 <constraints primaryKey="true" nullable="false"/>
  16.             </column>            
  17.             <column name="carOwner" type="int">
  18.                 <constraints foreignKeyName="other_table_fk" references="person(id)" nullable="false"/>
  19.             </column>
  20.         </createTable> 
  21.     </changeSet>

  22.     <changeSet id="2" author="batz">
  23.         <dropAllForeignKeyConstraints baseTableName="car" />
  24.     </changeSet>


  25. </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

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>