Skip to content

Commit ae5fb56

Browse files
authored
Skip inserting data when creating empty schemas (#258)
1 parent 026e061 commit ae5fb56

File tree

9 files changed

+32
-10
lines changed

9 files changed

+32
-10
lines changed

GenotypeAssays/resources/schemas/dbscripts/postgresql/genotypeassays-0.00-0.01.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ CREATE TABLE genotypeassays.assaytypes (
2323
CONSTRAINT pk_assaytypes PRIMARY KEY (name)
2424
);
2525

26+
-- @SkipOnEmptySchemasBegin
2627
INSERT INTO genotypeassays.assaytypes (name, description) VALUES ('SSP', 'Sequence-specific PCR');
2728
INSERT INTO genotypeassays.assaytypes (name, description) VALUES ('STR', 'Microsatellite');
28-
INSERT INTO genotypeassays.assaytypes (name, description) VALUES ('SBT', 'Sequence-based Genotyping');
29+
INSERT INTO genotypeassays.assaytypes (name, description) VALUES ('SBT', 'Sequence-based Genotyping');
30+
-- @SkipOnEmptySchemasEnd

GenotypeAssays/resources/schemas/dbscripts/postgresql/genotypeassays-0.02-0.03.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ CREATE TABLE genotypeassays.ssp_result_types
2626
CONSTRAINT PK_ssp_result_types PRIMARY KEY (result)
2727
);
2828

29+
-- @SkipOnEmptySchemasBegin
2930
INSERT into genotypeassays.ssp_result_types (result, meaning, importAliases) VALUES ('POS', 'Positive', '+,1,Y');
3031
INSERT into genotypeassays.ssp_result_types (result, meaning, importAliases) VALUES ('NEG', 'Negative', '-,0,N');
3132
INSERT into genotypeassays.ssp_result_types (result, meaning, importAliases) VALUES ('IND', 'Indeterminate', null);
32-
INSERT into genotypeassays.ssp_result_types (result, meaning, importAliases) VALUES ('FAIL', 'Fail', 'F');
33+
INSERT into genotypeassays.ssp_result_types (result, meaning, importAliases) VALUES ('FAIL', 'Fail', 'F');
34+
-- @SkipOnEmptySchemasEnd

elispot_assay/resources/schemas/dbscripts/postgresql/elispot_assay-0.00-0.01.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ CREATE TABLE elispot_assay.assay_types (
5656
constraint PK_assay_types PRIMARY KEY (rowid)
5757
);
5858

59+
-- @SkipOnEmptySchemasBegin
5960
INSERT INTO elispot_assay.assay_types (name, description) VALUES ('IFN-Gamma', 'Interferon Gamma');
61+
-- @SkipOnEmptySchemasEnd
6062

6163
CREATE TABLE elispot_assay.instruments
6264
(
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
INSERT INTO elispot_assay.instruments (instrument) VALUES ('AID Plate Reader');
1+
-- @SkipOnEmptySchemasBegin
2+
INSERT INTO elispot_assay.instruments (instrument) VALUES ('AID Plate Reader');
3+
-- @SkipOnEmptySchemasEnd

elispot_assay/resources/schemas/dbscripts/postgresql/elispot_assay-0.03-0.04.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- @SkipOnEmptySchemasBegin
12
TRUNCATE TABLE elispot_assay.peptide_pools;
23
INSERT INTO elispot_assay.peptide_pools (pool_name, category) VALUES ('SIVmac239 Env Pool A', 'SIV');
34
INSERT INTO elispot_assay.peptide_pools (pool_name, category) VALUES ('SIVmac239 Env Pool B', 'SIV');
@@ -909,3 +910,4 @@ INSERT INTO elispot_assay.peptide_pool_members (poolid, sequence) select rowid,
909910
INSERT INTO elispot_assay.peptide_pool_members (poolid, sequence) select rowid, 'GKEVDSSSHMEDTGE' as sequence from elispot_assay.peptide_pools pp WHERE pp.pool_name = 'SIVmac239 Pol Pool Z';
910911
INSERT INTO elispot_assay.peptide_pool_members (poolid, sequence) select rowid, 'DSSSHMEDTGEAREV' as sequence from elispot_assay.peptide_pools pp WHERE pp.pool_name = 'SIVmac239 Pol Pool Z';
911912
INSERT INTO elispot_assay.peptide_pool_members (poolid, sequence) select rowid, 'HMEDTGEAREVA' as sequence from elispot_assay.peptide_pools pp WHERE pp.pool_name = 'SIVmac239 Pol Pool Z';
913+
-- @SkipOnEmptySchemasEnd

flowassays/resources/schemas/dbscripts/postgresql/flowassays-0.00-0.01.sql

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ CREATE TABLE flowassays.populations
3030
CONSTRAINT PK_populations PRIMARY KEY (Name)
3131
);
3232

33+
-- @SkipOnEmptySchemasBegin
3334
INSERT INTO flowassays.populations (Name) VALUES
3435
('NK'),
3536
('CD14 Mono'),
@@ -38,7 +39,7 @@ INSERT INTO flowassays.populations (Name) VALUES
3839
('CD4'),
3940
('CD14'),
4041
('CD8');
41-
42+
-- @SkipOnEmptySchemasEnd
4243

4344
CREATE TABLE flowassays.units
4445
(
@@ -47,15 +48,16 @@ CREATE TABLE flowassays.units
4748
CONSTRAINT PK_units PRIMARY KEY (unit)
4849
);
4950

51+
-- @SkipOnEmptySchemasBegin
5052
INSERT INTO flowassays.units VALUES ('cells/uL'), ('Tc/uL');
51-
53+
-- @SkipOnEmptySchemasEnd
5254

5355
UPDATE flowassays.populations SET Name = 'CD4 T-cells' WHERE Name = 'CD4';
5456
UPDATE flowassays.populations SET Name = 'CD8 T-cells' WHERE Name = 'CD8';
5557

56-
58+
-- @SkipOnEmptySchemasBegin
5759
INSERT INTO flowassays.units VALUES ('%');
58-
60+
-- @SkipOnEmptySchemasEnd
5961

6062
CREATE TABLE flowassays.instruments
6163
(
@@ -64,7 +66,9 @@ CREATE TABLE flowassays.instruments
6466
CONSTRAINT PK_instruments PRIMARY KEY (instrument)
6567
);
6668

69+
-- @SkipOnEmptySchemasBegin
6770
INSERT INTO flowassays.instruments VALUES ('BD LSR II');
71+
-- @SkipOnEmptySchemasEnd
6872

6973
CREATE TABLE flowassays.assay_types (
7074
rowid serial,
@@ -74,6 +78,7 @@ CREATE TABLE flowassays.assay_types (
7478
constraint pk_assay_types PRIMARY KEY (rowid)
7579
);
7680

81+
-- @SkipOnEmptySchemasBegin
7782
DELETE FROM flowassays.populations WHERE name = 'NK';
7883
DELETE FROM flowassays.populations WHERE name = 'CD4';
7984
DELETE FROM flowassays.populations WHERE name = 'CD8';
@@ -97,4 +102,5 @@ DELETE FROM flowassays.populations WHERE name = 'T-cells';
97102
INSERT INTO flowassays.populations(name) VALUES ('T-cells');
98103

99104

100-
INSERT INTO flowassays.assay_types(name) VALUES ('TruCount');
105+
INSERT INTO flowassays.assay_types(name) VALUES ('TruCount');
106+
-- @SkipOnEmptySchemasEnd

flowassays/resources/schemas/dbscripts/postgresql/flowassays-0.02-0.03.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
-- @SkipOnEmptySchemasBegin
1617
DELETE FROM flowassays.populations WHERE name = 'T-cells';
1718
DELETE FROM flowassays.populations WHERE name = 'T-Cells';
1819
INSERT INTO flowassays.populations (name) VALUES ('T-cells');
1920

2021
DELETE FROM flowassays.populations WHERE name = 'Lymphocytes';
2122
INSERT INTO flowassays.populations (name) VALUES ('Lymphocytes');
2223

23-
INSERT INTO flowassays.assay_types (name) VALUES ('Phenotyping');
24+
INSERT INTO flowassays.assay_types (name) VALUES ('Phenotyping');
25+
-- @SkipOnEmptySchemasEnd
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
DELETE FROM flowassays.populations WHERE name = 'Lymphocytes';
1+
-- @SkipOnEmptySchemasBegin
2+
DELETE FROM flowassays.populations WHERE name = 'Lymphocytes';
23
INSERT INTO flowassays.populations (name) VALUES ('Lymphocytes');
34

45
DELETE FROM flowassays.assay_types WHERE name = 'Tetramer';
56
DELETE FROM flowassays.assay_types WHERE name = 'Phenotyping';
67
INSERT INTO flowassays.assay_types(name) VALUES ('Tetramer');
78
INSERT INTO flowassays.assay_types(name) VALUES ('Phenotyping');
9+
-- @SkipOnEmptySchemasEnd

tcrdb/resources/schemas/dbscripts/postgresql/tcrdb-15.31-15.32.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CREATE TABLE tcrdb.loci (
44
constraint PK_loci PRIMARY KEY (locus)
55
);
66

7+
-- @SkipOnEmptySchemasBegin
78
INSERT INTO tcrdb.loci (locus) VALUES ('IGH');
89
INSERT INTO tcrdb.loci (locus) VALUES ('IGL');
910
INSERT INTO tcrdb.loci (locus) VALUES ('IGK');
@@ -14,3 +15,4 @@ INSERT INTO tcrdb.loci (locus) VALUES ('TRD');
1415
INSERT INTO tcrdb.loci (locus) VALUES ('IG');
1516
INSERT INTO tcrdb.loci (locus) VALUES ('TCR');
1617
INSERT INTO tcrdb.loci (locus) VALUES ('ALL');
18+
-- @SkipOnEmptySchemasEnd

0 commit comments

Comments
 (0)