Skip to content

Commit

Permalink
COH-59: Add PostgreSQL support
Browse files Browse the repository at this point in the history
  • Loading branch information
wikumChamith committed Oct 1, 2024
1 parent 022fcdf commit ab052b7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions api/src/main/resources/liquibase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<constraints foreignKeyName="cohorttypeeditor_fk" references="users(user_id)"/>
</column>
<column name="date_changed" type="datetime"/>
<column name="voided" type="tinyint(1)" defaultValueBoolean="false">
<column name="voided" type="boolean" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="voided_by" type="int(11)">
Expand Down Expand Up @@ -90,7 +90,7 @@
<constraints foreignKeyName="cohort_attribute_type_editor_fk" references="users(user_id)"/>
</column>
<column name="date_changed" type="datetime"/>
<column name="retired" type="tinyint(1)" defaultValueBoolean="false">
<column name="retired" type="boolean" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="retired_by" type="int(11)">
Expand Down Expand Up @@ -144,7 +144,7 @@
</preConditions>
<comment>Creating a is_group_cohort column</comment>
<addColumn tableName="cohort">
<column name="is_group_cohort" type="tinyint(1)" defaultValue="null"/>
<column name="is_group_cohort" type="boolean" defaultValue="null"/>
</addColumn>
</changeSet>
<changeSet id="cohortmodul1065_cohort_type_id" author="sharon">
Expand Down Expand Up @@ -193,7 +193,7 @@
<constraints foreignKeyName="cohort_attribute_editor_fk" references="users(user_id)"/>
</column>
<column name="date_changed" type="datetime"/>
<column name="voided" type="tinyint(1)" defaultValueBoolean="false">
<column name="voided" type="boolean" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="voided_by" type="int(11)">
Expand Down Expand Up @@ -266,7 +266,7 @@
<constraints foreignKeyName="cohort_member_attribute_type_changed_by_fk" references="users(user_id)"/>
</column>
<column name="date_changed" type="datetime"/>
<column name="retired" type="tinyint(1)" defaultValueBoolean="false">
<column name="retired" type="boolean" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="retired_by" type="int(11)">
Expand Down Expand Up @@ -312,7 +312,7 @@
<constraints foreignKeyName="cohort_member_attribute_editor_fk" references="users(user_id)"/>
</column>
<column name="date_changed" type="datetime"/>
<column name="voided" type="tinyint(1)" defaultValueBoolean="false">
<column name="voided" type="boolean" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="voided_by" type="int(11)">
Expand All @@ -330,11 +330,13 @@
<preConditions>
<columnExists tableName="cohort" columnName="location_id"/>
</preConditions>
<dropDefaultValue tableName="cohort" columnName="location_id"/>
<modifyDataType tableName="cohort" columnName="location_id" newDataType="int(11)"/>
<addForeignKeyConstraint baseTableName="cohort" baseColumnNames="location_id"
referencedTableName="location" referencedColumnNames="location_id"
constraintName="cohort_location_fk"/>
</changeSet>

<changeSet id="add_cohort_location_index" author="ibacher">
<preConditions onFail="MARK_RAN">
<not>
Expand Down

0 comments on commit ab052b7

Please sign in to comment.