Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1108: Update database structure diagram #1111

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/PowerAuth-Server-1.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ This guide contains instructions for migration from PowerAuth Server version `1.
### Forbid name duplication for operation templates.

Add unique constraint to `templateName` column in `pa_operation_template` table.

### Add foreign key constraints to operations and applications relation.

Add foreign key constraints to relating table `pa_operation_application`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.xsd">

<changeSet id="1" logicalFilePath="powerauth-java-server/1.5.x/20231106-add-foreign-keys.xml" author="Jan Pesek">
jnpsk marked this conversation as resolved.
Show resolved Hide resolved
<preConditions onFail="MARK_RAN">
<not>
<foreignKeyConstraintExists foreignKeyTableName="pa_operation_application"
foreignKeyName="pa_operation_application_application_id_fk" />
</not>
</preConditions>
<addForeignKeyConstraint
baseTableName="pa_operation_application" baseColumnNames="application_id"
constraintName="pa_operation_application_application_id_fk"
referencedTableName="pa_application" referencedColumnNames="id"/>
</changeSet>

<changeSet id="2" logicalFilePath="powerauth-java-server/1.5.x/20231106-add-foreign-keys.xml" author="Jan Pesek">
jnpsk marked this conversation as resolved.
Show resolved Hide resolved
<preConditions onFail="MARK_RAN">
<not>
<foreignKeyConstraintExists foreignKeyTableName="pa_operation_application"
foreignKeyName="pa_operation_application_operation_id_fk" />
</not>
</preConditions>
<addForeignKeyConstraint
baseTableName="pa_operation_application" baseColumnNames="operation_id"
constraintName="pa_operation_application_operation_id_fk"
referencedTableName="pa_operation" referencedColumnNames="id"/>
</changeSet>

</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.xsd">

<include file="20231018-add-constraint-operation-template-name.xml" relativeToChangelogFile="true" />
<include file="20231106-add-foreign-keys.xml" relativeToChangelogFile="true" />

</databaseChangeLog>
Binary file modified docs/images/arch_db_structure.png
jnpsk marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.