Discussion:
[Liquibase-user] New Topic: 2.0 RC6 breaks generateChangeLog by introducing "PRIMARY" index(es)
Liquibase Community Forum
2010-10-05 16:28:01 UTC
Permalink
A new topic, '2.0 RC6 breaks generateChangeLog by introducing "PRIMARY" index(es)', has been made on a board you are watching.

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

The text of the topic is shown below:

Hi,

I just upgraded from RC5 to RC6 and found that my generated changelogs are broken. See below for an example.

The problem is, that
mysql does not want to create an index called PRIMARY
all single values primary keys get a generated PRIMARY-index


Code:

<changeSet author="Jens" id="v1.3.0initial-2">
<createTable tableName="first_table">
<column autoIncrement="${autoIncrement}" name="ID" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="RESULT_ID" type="BIGINT"/>
<column name="APPLIANCE_ID" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column defaultValueNumeric="0E-15" name="PERCENTAGE" type="DECIMAL(38,15)"/>
</createTable>
</changeSet>

...
<changeSet author="Jens" id="v1.3.0initial-45">
<createIndex indexName="PRIMARY" tableName="first_table" unique="true">
<column name="ID"/>
</createIndex>
</changeSet>
<changeSet author="Jens" id="v1.3.0initial-46">
<createIndex indexName="RESULT_ID" tableName="first_table" unique="true">
<column name="APPLIANCE_ID"/>
<column name="RESULT_ID"/>
</createIndex>
</changeSet>
...
<changeSet author="Jens" id="v1.3.0initial-61">
<createIndex indexName="PRIMARY" tableName="second_table" unique="true">
<column name="id"/>
</createIndex>
</changeSet>


The script is somewhat post-processed (e.g. adding autoIncrement="${autoIncrement}").

Is this behavior by design, or some last-minute bug?

Jens

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.

Loading...