-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add survey units unique constraints in DB (#250)
- Loading branch information
Showing
6 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
queen-infra-db/src/main/resources/db/changelog/600_unique_constraints.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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="davdarras" id="600-1"> | ||
<dropIndex indexName="idx_state_data_su" | ||
tableName="state_data"/> | ||
</changeSet> | ||
|
||
<changeSet author="davdarras" id="600-2"> | ||
<createIndex indexName="idx_state_data_su" tableName="state_data" unique="true"> | ||
<column name="survey_unit_id"/> | ||
</createIndex> | ||
</changeSet> | ||
|
||
<changeSet author="davdarras" id="600-3"> | ||
<dropIndex indexName="idx_comment_su" | ||
tableName="comment"/> | ||
</changeSet> | ||
|
||
<changeSet author="davdarras" id="600-4"> | ||
<createIndex indexName="idx_comment_su" tableName="comment" unique="true"> | ||
<column name="survey_unit_id"/> | ||
</createIndex> | ||
</changeSet> | ||
|
||
<changeSet author="davdarras" id="600-5"> | ||
<dropIndex indexName="idx_personalization_su" | ||
tableName="personalization"/> | ||
</changeSet> | ||
|
||
<changeSet author="davdarras" id="600-6"> | ||
<createIndex indexName="idx_personalization_su" tableName="personalization" unique="true"> | ||
<column name="survey_unit_id"/> | ||
</createIndex> | ||
</changeSet> | ||
|
||
<changeSet author="davdarras" id="600-7"> | ||
<dropIndex indexName="idx_data_su" | ||
tableName="data"/> | ||
</changeSet> | ||
|
||
<changeSet author="davdarras" id="600-8"> | ||
<createIndex indexName="idx_data_su" tableName="data" unique="true"> | ||
<column name="survey_unit_id"/> | ||
</createIndex> | ||
</changeSet> | ||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters