-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert species table to be container-scoped
- Loading branch information
Showing
9 changed files
with
71 additions
and
12 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
laboratory/resources/schemas/dbscripts/postgresql/laboratory-12.305-12.306.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,11 @@ | ||
ALTER TABLE laboratory.species ADD rowid SERIAL; | ||
ALTER TABLE laboratory.species ADD container entityid; | ||
ALTER TABLE laboratory.species ADD created timestamp; | ||
ALTER TABLE laboratory.species ADD createdby int; | ||
ALTER TABLE laboratory.species ADD modified timestamp; | ||
ALTER TABLE laboratory.species ADD modifiedby int; | ||
|
||
UPDATE laboratory.species SET container = (SELECT entityid FROM core.containers WHERE name = 'Shared'); | ||
|
||
ALTER TABLE laboratory.species DROP CONSTRAINT PK_species; | ||
ALTER TABLE laboratory.species ADD CONSTRAINT PK_species PRIMARY KEY (rowid); |
11 changes: 11 additions & 0 deletions
11
laboratory/resources/schemas/dbscripts/sqlserver/laboratory-12.305-12.306.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,11 @@ | ||
ALTER TABLE laboratory.species ADD rowid INT identity(1,1); | ||
ALTER TABLE laboratory.species ADD container entityid; | ||
ALTER TABLE laboratory.species ADD created datetime; | ||
ALTER TABLE laboratory.species ADD createdby int; | ||
ALTER TABLE laboratory.species ADD modified datetime; | ||
ALTER TABLE laboratory.species ADD modifiedby int; | ||
GO | ||
UPDATE laboratory.species SET container = (SELECT entityid FROM core.containers WHERE name = 'Shared'); | ||
|
||
ALTER TABLE laboratory.species DROP CONSTRAINT PK_species; | ||
ALTER TABLE laboratory.species ADD CONSTRAINT PK_species PRIMARY KEY (rowid); |
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
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
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
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
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
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
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