File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
laboratory/resources/schemas/dbscripts Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ALTER TABLE laboratory.species ADD createdby int;
55ALTER TABLE laboratory .species ADD modified timestamp ;
66ALTER TABLE laboratory .species ADD modifiedby int ;
77
8- UPDATE laboratory .species SET container = (SELECT entityid FROM core .containers WHERE name = ' Shared' );
8+ UPDATE laboratory .species SET container = (SELECT entityid FROM core .containers c1 WHERE name = ' Shared' and ( select parent from core . Containers c2 where c2 . EntityId = c1 . Parent ) is null );
99
1010ALTER TABLE laboratory .species DROP CONSTRAINT PK_species;
1111ALTER TABLE laboratory .species ADD CONSTRAINT PK_species PRIMARY KEY (rowid);
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ALTER TABLE laboratory.species ADD createdby int;
55ALTER TABLE laboratory .species ADD modified datetime ;
66ALTER TABLE laboratory .species ADD modifiedby int ;
77GO
8- UPDATE laboratory .species SET container = (SELECT entityid FROM core .containers WHERE name = ' Shared' );
8+ UPDATE laboratory .species SET container = (SELECT entityid FROM core .containers c1 WHERE name = ' Shared' and ( select parent from core . Containers c2 where c2 . EntityId = c1 . Parent ) is null );
99
1010ALTER TABLE laboratory .species DROP CONSTRAINT PK_species;
1111ALTER TABLE laboratory .species ADD CONSTRAINT PK_species PRIMARY KEY (rowid);
You can’t perform that action at this time.
0 commit comments