Skip to content

Commit

Permalink
Fix #852: Allow scoping operation to a single activation ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jandusil committed Nov 15, 2023
1 parent 475efc2 commit 724d059
Showing 1 changed file with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,19 @@

<changeSet id="1" logicalFilePath="powerauth-java-server/1.6.x/20231112-add-activation-id.xml" author="Jan Dusil">
<preConditions onFail="MARK_RAN">
<tableExists tableName="pa_operation"/>
<not>
<columnExists tableName="pa_operation" columnName="activation_id"/>
</not>
</preConditions>
<comment>Add activation_id column to pa_operation</comment>
<addColumn tableName="pa_operation">
<column name="activation_id" type="varchar(37)"/>
</addColumn>
</changeSet>

<changeSet id="2" logicalFilePath="powerauth-java-server/1.6.x/20231112-add-fk-to-activation-id.xml"
author="Jan Dusil">
<preConditions onFail="MARK_RAN">
<tableExists tableName="pa_activation"/>
<tableExists tableName="pa_operation"/>
<columnExists tableName="pa_activation" columnName="activation_id"/>
<columnExists tableName="pa_operation" columnName="activation_id"/>
<not>
<foreignKeyConstraintExists foreignKeyTableName="pa_operation"
foreignKeyName="pa_operation_activation_id_fk"/>
</not>
</preConditions>
<comment>Add foreign key constraint to activation_id in pa_operation</comment>
<addForeignKeyConstraint constraintName="pa_operation_activation_id_fk"
baseTableName="pa_operation"
baseColumnNames="activation_id"
referencedTableName="pa_activation"
referencedColumnNames="activation_id"/>
<comment>Add activation_id column with foreign key constraint to pa_operation</comment>
<addColumn tableName="pa_operation">
<column name="activation_id" type="varchar(37)">
<constraints nullable="true" foreignKeyName="pa_operation_activation_id_fk"
referencedTableName="pa_activation" referencedColumnNames="activation_id"/>
</column>
</addColumn>
</changeSet>
</databaseChangeLog>

0 comments on commit 724d059

Please sign in to comment.