-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new table custom_protein_region_annotation to DB create, WB model
To match prev GIT commit. Add custom_protein_region_annotation to DB create SQL, MySQL Workbench Model File, and create new DB Upgrade SQL.
- Loading branch information
Showing
3 changed files
with
135 additions
and
66 deletions.
There are no files selected for viewing
Binary file modified
BIN
+24.9 KB
(110%)
database_scripts/MySQL_Workbench_Model/Proxl_Database_MySQL_Workbench_Model.mwb
Binary file not shown.
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
34 changes: 34 additions & 0 deletions
34
database_scripts/upgrades/2018_05_add__custom_protein_region_annotation.sql
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,34 @@ | ||
|
||
|
||
-- New table custom_protein_region_annotation | ||
|
||
|
||
CREATE TABLE custom_protein_region_annotation ( | ||
protein_sequence_version_id INT(10) UNSIGNED NOT NULL, | ||
project_id INT(10) UNSIGNED NOT NULL, | ||
start_position MEDIUMINT(8) UNSIGNED NOT NULL, | ||
end_position MEDIUMINT(8) UNSIGNED NOT NULL, | ||
annotation_color VARCHAR(255) NOT NULL, | ||
annotation_text VARCHAR(20000) NOT NULL, | ||
created_by INT(10) UNSIGNED NOT NULL, | ||
created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (protein_sequence_version_id, project_id, start_position, end_position), | ||
CONSTRAINT cust_prtn_rgn_anno_auth_user_fk | ||
FOREIGN KEY (created_by) | ||
REFERENCES auth_user (id) | ||
ON DELETE RESTRICT | ||
ON UPDATE RESTRICT, | ||
CONSTRAINT cust_prtn_rgn_anno_project_fk | ||
FOREIGN KEY (project_id) | ||
REFERENCES project (id) | ||
ON DELETE CASCADE, | ||
CONSTRAINT cust_prtn_rgn_anno_protn_s_v_id_fk | ||
FOREIGN KEY (protein_sequence_version_id) | ||
REFERENCES protein_sequence_version (id) | ||
ON DELETE CASCADE) | ||
ENGINE = InnoDB; | ||
|
||
CREATE INDEX cust_prtn_rgn_anno_auth_user_fk ON custom_protein_region_annotation (created_by ASC); | ||
|
||
CREATE INDEX cust_prtn_rgn_anno_project_fk ON custom_protein_region_annotation (project_id ASC); | ||
|