Skip to content

Commit

Permalink
Added the current validCheckSum Foreign key constraint violation when…
Browse files Browse the repository at this point in the history
… altering privilege.privilege column - TRUNK-3993
  • Loading branch information
wluyima committed Jun 3, 2013
1 parent 1566fa7 commit 92bd88f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions api/src/main/resources/liquibase-update-to-latest.xml
Expand Up @@ -6953,31 +6953,46 @@
</changeSet>

<changeSet id="1-increase-privilege-col-size-privilege" author="dkayiwa">
<validCheckSum>3:b5f33650ea723f2304f40fd60fde36df</validCheckSum><!-- old -->
<validCheckSum>3:6ecff8787eca17532e310087cfd65a06</validCheckSum><!-- New after fixing bug where we have to first drop constraints -->
<preConditions onFail="MARK_RAN">
<columnExists tableName="privilege" columnName="privilege"/>
</preConditions>
<comment>
Increasing the size of the privilege column in the privilege table
</comment>
<dropForeignKeyConstraint constraintName="privilege_which_can_edit" baseTableName="person_attribute_type" />
<dropForeignKeyConstraint constraintName="privilege_definitons" baseTableName="role_privilege" />
<ext:modifyColumn tableName="privilege">
<column name="privilege" type="varchar(255)">
<constraints nullable="false" />
</column>
</ext:modifyColumn>
<addForeignKeyConstraint baseTableName="person_attribute_type" baseColumnNames="edit_privilege" constraintName="privilege_which_can_edit"
referencedTableName="privilege" referencedColumnNames="privilege"/>
<addForeignKeyConstraint constraintName="privilege_definitions"
baseTableName="role_privilege" baseColumnNames="privilege"
referencedTableName="privilege" referencedColumnNames="privilege"/>
</changeSet>

<changeSet id="2-increase-privilege-col-size-rol-privilege" author="dkayiwa">
<validCheckSum>3:96a937a1719f8e7a98ad682a5608f54b</validCheckSum><!-- old -->
<validCheckSum>3:6fc0247ae054fedeb32a4af3775046f4</validCheckSum><!-- New after fixing bug where we have to first drop constraints -->
<preConditions onFail="MARK_RAN">
<columnExists tableName="role_privilege" columnName="privilege"/>
</preConditions>
<comment>
Increasing the size of the privilege column in the role_privilege table
</comment>
<dropForeignKeyConstraint constraintName="privilege_definitions" baseTableName="role_privilege" />
<ext:modifyColumn tableName="role_privilege">
<column name="privilege" type="varchar(255)">
<constraints nullable="false" />
</column>
</ext:modifyColumn>
<addForeignKeyConstraint constraintName="privilege_definitions"
baseTableName="role_privilege" baseColumnNames="privilege"
referencedTableName="privilege" referencedColumnNames="privilege"/>
</changeSet>

<changeSet id="201205241728-1" author="mvorobey">
Expand Down

0 comments on commit 92bd88f

Please sign in to comment.