-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates new table that tracks the test results reported per disease i…
…n an upload (#6886) * Added db changes to create new table that tracks diseases reported with the uploader. * Solved merge conflicts
- Loading branch information
1 parent
032789e
commit 342ba29
Showing
1 changed file
with
89 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |