Skip to content

Commit

Permalink
Fix diff on constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-WorkGH committed Oct 17, 2023
1 parent e35c161 commit 7dca85c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet author="chuinetri (generated)" id="1697548639163-1">
<comment>Missing update from #61</comment>
<modifyDataType columnName="status" newDataType="varchar(255)" tableName="computation_status"/>
<dropColumn columnName="ok" tableName="computation_status"/>
</changeSet>

<changeSet author="chuinetri (base generated)" id="1697548639163-2">
<comment>We reconstruct primary/foreign keys constraints</comment>
<dropForeignKeyConstraint baseTableName="contingency_entity_contingency_elements" constraintName="FKPNMUIJ3QKI9U4KF7OMME39UGN"/>
<dropPrimaryKey tableName="contingency"/>
</changeSet>
<changeSet author="chuinetri (base generated)" id="1697548639163-3">
<comment>Next part of 1697548639163-2</comment>
<addPrimaryKey columnNames="contingency_id, result_uuid" constraintName="contingencyPK" tableName="contingency"/>
<createIndex indexName="IX_contingencyPK" tableName="contingency" unique="true">
<column name="contingency_id"/>
<column name="result_uuid"/>
</createIndex>
<addForeignKeyConstraint baseColumnNames="contingency_entity_contingency_id,contingency_entity_result_uuid" baseTableName="contingency_entity_contingency_elements" constraintName="FKpnmuij3qki9u4kf7omme39ugn" deferrable="false" initiallyDeferred="false" referencedColumnNames="contingency_id,result_uuid" referencedTableName="contingency" validate="true"/>
</changeSet>
</databaseChangeLog>
4 changes: 3 additions & 1 deletion src/main/resources/db/changelog/db.changelog-master.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
databaseChangeLog:

- include:
file: changesets/changelog_20220204T114931Z.xml
relativeToChangelogFile: true
Expand All @@ -12,3 +11,6 @@ databaseChangeLog:
- include:
file: changesets/changelog_20230801T194601Z.xml
relativeToChangelogFile: true
- include:
file: changesets/changelog_20231017T131658Z.xml
relativeToChangelogFile: true

0 comments on commit 7dca85c

Please sign in to comment.