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

Creates new table that tracks the test results reported per disease in an upload #6886

Merged
Merged
Changes from all commits
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
90 changes: 89 additions & 1 deletion backend/src/main/resources/db/changelog/db.changelog-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5129,4 +5129,92 @@ databaseChangeLog:
tableName: upload
columnName: supported_disease_id
sql: |
DROP TYPE ${database.defaultSchemaName}.PIPELINE CASCADE;
DROP TYPE ${database.defaultSchemaName}.PIPELINE CASCADE;
- changeSet:
id: create-upload_disease_details-table
author: [email protected]
comment: creates upload_disease_details table and drops the disease_id column from upload table
changes:
- tagDatabase:
tag: create-upload_disease_details-table
- dropColumn:
tableName: upload
columnName: supported_disease_id
- createTable:
tableName: upload_disease_details
remarks: contains details of each of the diseases reported in the bulk upload.
columns:
- column:
name: internal_id
type: uuid
remarks: The internal database identifier for this entity.
constraints:
primaryKey: true
nullable: false
- column:
name: upload_id
remarks: the upload internal id.
type: uuid
constraints:
nullable: false
foreignKeyName: fk__upload_disease_details__upload
references: upload
- column:
name: supported_disease_id
remarks: The supported disease reported in the upload.
type: uuid
constraints:
nullable: false
foreignKeyName: fk__upload_disease_details__supported_disease
references: supported_disease
- column:
name: records_count
remarks: The number of records uploaded for the disease.
type: int
constraints:
nullable: false
- column:
name: created_at
type: DATETIME
remarks: The creation timestamp for this entity.
constraints:
nullable: false
- column:
name: created_by
type: uuid
remarks: The user who created this entity.
constraints:
nullable: false
foreignKeyName: fk__anyentity__created_by
references: api_user
- column:
name: updated_at
type: DATETIME
remarks: The timestamp for the most recent update of this entity.
constraints:
nullable: false
- column:
name: updated_by
type: uuid
remarks: The user who most recently updated this entity.
constraints:
nullable: false
references: api_user
foreignKeyName: fk__anyentity__updated_by
- sql: |
GRANT SELECT ON ${database.defaultSchemaName}.upload_disease_details TO ${noPhiUsername};
rollback:
- addColumn:
tableName: upload
columns:
- column:
name: supported_disease_id
remarks: The disease that was reported.
type: uuid
constraints:
nullable: true
foreignKeyName: fk__upload__supported_disease_id
referencedTableName: supported_disease
referencedColumnNames: internal_id
- dropTable:
tableName: upload_disease_details
Loading