-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from wultra/issues/merge-upstream
Merge upstream
- Loading branch information
Showing
46 changed files
with
855 additions
and
402 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Database Structure | ||
|
||
<!-- TEMPLATE database --> | ||
|
||
You can download DDL scripts for supported databases: | ||
|
||
- [PostgreSQL - Create Database Schema](./sql/postgresql/enrollment/create-schema.sql) | ||
- [Oracle - Create Database Schema](./sql/oracle/enrollment/create-schema.sql) | ||
|
||
|
||
## Auditing | ||
|
||
The DDL files contain an `audit_log` table definition. The table differs slightly per database. | ||
|
||
Only one `audit_log` table is required per PowerAuth stack in case the same schema is used for all deployed applications. | ||
|
||
For more information about auditing library, see the [Wultra auditing library documentation](https://github.com/wultra/lime-java-core#wultra-auditing-library). | ||
|
||
|
||
## Table Documentation | ||
|
||
This chapter explains individual tables and their columns. The column types are used from PostgreSQL dialect, other databases use types that are equivalent (mapping is usually straight-forward). | ||
|
||
<!-- begin database table es_operation_template --> | ||
### Operation Template Table | ||
|
||
Stores operation templates to be shown by the mobile application. | ||
For more information, see [Operation Extensions](Operation-Extensions.md) and [Customizing Operation Form Data](Operation-Form-Data.md). | ||
|
||
#### Schema | ||
|
||
| Name | Type | Info | Note | | ||
|---------------|----------------|------------------------|------------------------------------------------------------------------------------------| | ||
| `id` | `BIGINT` | `NOT NULL PRIMARY KEY` | Autogenerated record identifier. | | ||
| `placeholder` | `VARCHAR(255)` | `NOT NULL` | Operation type at PowerAuth server. | | ||
| `language` | `VARCHAR(8)` | `NOT NULL` | Language of the template. | | ||
| `title` | `VARCHAR(255)` | `NOT NULL` | Title of the operation. | | ||
| `message` | `TEXT` | `NOT NULL` | Message for the user related to the operation. | | ||
| `attributes` | `TEXT` | | Structured custom form data attributes as JSON. | | ||
| `ui` | `TEXT` | | JSON configuration which may affect behavior or visual aspect of the mobile application. | | ||
|
||
<!-- end --> |
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
67 changes: 67 additions & 0 deletions
67
docs/db/changelog/changesets/enrollment-server-onboarding/1.5.x/20230614-add-sca-result.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,67 @@ | ||
<?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="enrollment-server-onboarding/1.5.x/20230614-add-sca-result.xml" author="Lubos Racansky"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<sequenceExists sequenceName="es_sca_result_seq"/> | ||
</not> | ||
</preConditions> | ||
<comment>Create a new sequence es_sca_result_seq</comment> | ||
<createSequence sequenceName="es_sca_result_seq" incrementBy="50"/> | ||
</changeSet> | ||
|
||
<changeSet id="2" logicalFilePath="enrollment-server-onboarding/1.5.x/20230614-add-sca-result.xml" author="Lubos Racansky"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<tableExists tableName="es_sca_result"/> | ||
</not> | ||
</preConditions> | ||
<comment>Create a new table es_onboarding_process</comment> | ||
<createTable tableName="es_sca_result"> | ||
<column name="id" type="bigint"> | ||
<constraints primaryKey="true"/> | ||
</column> | ||
<column name="identity_verification_id" type="varchar(36)"> | ||
<constraints nullable="false" foreignKeyName="fk_es_identity_verification_id" referencedTableName="es_identity_verification" referencedColumnNames="id"/> | ||
</column> | ||
<column name="process_id" type="varchar(36)"> | ||
<constraints nullable="false" foreignKeyName="fk_es_onboarding_process_id" referencedTableName="es_onboarding_process" referencedColumnNames="id" /> | ||
</column> | ||
<column name="presence_check_result" type="varchar(32)" /> | ||
<column name="otp_verification_result" type="varchar(32)" /> | ||
<column name="sca_result" type="varchar(32)" /> | ||
<column name="timestamp_created" type="timestamp" defaultValueDate="${now}"> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="timestamp_last_updated" type="timestamp" /> | ||
</createTable> | ||
</changeSet> | ||
|
||
<changeSet id="3" logicalFilePath="enrollment-server-onboarding/1.5.x/20230614-add-sca-result.xml" author="Lubos Racansky"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<indexExists tableName="es_sca_result" indexName="identity_verification_id" /> | ||
</not> | ||
</preConditions> | ||
<comment>Create a new index on es_sca_result(identity_verification_id)</comment> | ||
<createIndex tableName="es_sca_result" indexName="identity_verification_id"> | ||
<column name="identity_verification_id" /> | ||
</createIndex> | ||
</changeSet> | ||
|
||
<changeSet id="4" logicalFilePath="enrollment-server-onboarding/1.5.x/20230614-add-sca-result.xml" author="Lubos Racansky"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<indexExists tableName="es_sca_result" indexName="process_id" /> | ||
</not> | ||
</preConditions> | ||
<comment>Create a new index on es_sca_result(process_id)</comment> | ||
<createIndex tableName="es_sca_result" indexName="process_id"> | ||
<column name="process_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
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
Oops, something went wrong.