Skip to content

Commit

Permalink
feat: add indexes for survey unit tables (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
davdarras authored Nov 9, 2023
1 parent 35f9ee8 commit 7a54067
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>fr.insee.queen</groupId>
<artifactId>queen</artifactId>
<version>3.5.44</version>
<version>3.5.45</version>
<packaging>war</packaging>
<name>Queen-Back-Office</name>
<description>Back-office services for Queen</description>
Expand Down
27 changes: 27 additions & 0 deletions src/main/resources/db/changelog/410_indexes_survey_unit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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="410-1">
<createIndex indexName="idx_state_data_su" tableName="state_data">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
<changeSet author="davdarras" id="410-2">
<createIndex indexName="idx_comment_su" tableName="comment">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
<changeSet author="davdarras" id="410-3">
<createIndex indexName="idx_personalization_su" tableName="personalization">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
<changeSet author="davdarras" id="410-4">
<createIndex indexName="idx_data_su" tableName="data">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
</databaseChangeLog>
1 change: 1 addition & 0 deletions src/main/resources/db/master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
<include file="changelog/300_update_data_model.xml" relativeToChangelogFile="true"/>
<!-- Add new table (tempzone) in db -->
<include file="changelog/400_add_new_temp_zone.xml" relativeToChangelogFile="true"/>
<include file="changelog/410_indexes_survey_unit.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
27 changes: 27 additions & 0 deletions src/test/resources/db/changelog/410_indexes_survey_unit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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="410-1">
<createIndex indexName="idx_state_data_su" tableName="state_data">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
<changeSet author="davdarras" id="410-2">
<createIndex indexName="idx_comment_su" tableName="comment">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
<changeSet author="davdarras" id="410-3">
<createIndex indexName="idx_personalization_su" tableName="personalization">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
<changeSet author="davdarras" id="410-4">
<createIndex indexName="idx_data_su" tableName="data">
<column name="survey_unit_id"/>
</createIndex>
</changeSet>
</databaseChangeLog>
1 change: 1 addition & 0 deletions src/test/resources/db/master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
<include file="changelog/300_update_data_model.xml" relativeToChangelogFile="true"/>
<!-- Add new table (tempzone) in db -->
<include file="changelog/400_add_new_temp_zone.xml" relativeToChangelogFile="true"/>
<include file="changelog/410_indexes_survey_unit.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

0 comments on commit 7a54067

Please sign in to comment.