Skip to content
Open
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
19 changes: 19 additions & 0 deletions schemas/ispyb/updates/2026_04_08_Protein_has_Component.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2026_04_08_Protein_has_Component.sql', 'ONGOING');

CREATE TABLE Protein_has_Component (
proteinHasComponentId int(11) unsigned PRIMARY KEY AUTO_INCREMENT,
proteinId int(10) unsigned NOT NULL COMMENT 'References Protein table',
componentId int(10) unsigned NOT NULL COMMENT 'References Component table',
CONSTRAINT `Protein_has_Component_fk_proteinId`
FOREIGN KEY (proteinId)
REFERENCES Protein (proteinId)
ON DELETE CASCADE
ON UPDATE CASCADE,
CONSTRAINT `Protein_has_Component_fk_componentId`
FOREIGN KEY (componentId)
REFERENCES Component (componentId)
ON DELETE CASCADE
ON UPDATE CASCADE
) COMMENT = 'Which elements are contained inside a molecule';

UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2026_04_08_Protein_has_Component.sql';
Loading