-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add annotation dataset foreign key (#3482)
* add annotation dataset foreign key and fix pull number from #3415 * add pr number to evolution and update migration #3482 * Update 035-add-annotation-dataset-foreign-key.sql * Update 035-add-annotation-dataset-foreign-key.sql
- Loading branch information
Showing
4 changed files
with
24 additions
and
5 deletions.
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
10 changes: 10 additions & 0 deletions
10
conf/evolutions/035-add-annotation-dataset-foreign-key.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,10 @@ | ||
-- https://github.com/scalableminds/webknossos/pull/3482 | ||
|
||
START TRANSACTION; | ||
|
||
ALTER TABLE webknossos.annotations | ||
ADD CONSTRAINT dataSet_ref FOREIGN KEY(_dataSet) REFERENCES webknossos.dataSets(_id) DEFERRABLE; | ||
|
||
UPDATE webknossos.releaseInformation SET schemaVersion = 35; | ||
|
||
COMMIT TRANSACTION; |
8 changes: 8 additions & 0 deletions
8
conf/evolutions/reversions/035-add-annotation-dataset-foreign-key.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,8 @@ | ||
START TRANSACTION; | ||
|
||
ALTER TABLE webknossos.annotations | ||
DROP CONSTRAINT dataSet_ref; | ||
|
||
UPDATE webknossos.releaseInformation SET schemaVersion = 34; | ||
|
||
COMMIT TRANSACTION; |
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