Skip to content
Snippets Groups Projects
Commit e262651f authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Remove NOT NULL constraint on object_xref.analysis_id

parent 0bcd02e4
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
# Add analysis_xref column to object_xref, copy values from identity_xref, remove column from identity_xref.
# Will allow all object_xref relationships to have an analysis, not just those from sequence matching.
ALTER TABLE object_xref ADD COLUMN analysis_id SMALLINT UNSIGNED NOT NULL;
ALTER TABLE object_xref ADD COLUMN analysis_id SMALLINT UNSIGNED;
UPDATE object_xref ox, identity_xref ix SET ox.analysis_id=ix.analysis_id WHERE ox.object_xref_id=ix.object_xref_id;
......
......@@ -691,7 +691,7 @@ CREATE TABLE object_xref (
NOT NULL,
xref_id INT UNSIGNED NOT NULL,
linkage_annotation VARCHAR(255) DEFAULT NULL,
analysis_id SMALLINT UNSIGNED NOT NULL,
analysis_id SMALLINT UNSIGNED,
UNIQUE (ensembl_object_type, ensembl_id, xref_id),
KEY oxref_idx (object_xref_id, xref_id, ensembl_object_type, ensembl_id),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment