@@ -1455,7 +1455,7 @@ CREATE TABLE targetedms.QCMetricConfiguration
14551455 CONSTRAINT UQ_QCMetricConfig_Name_Container UNIQUE (Name, Container)
14561456);
14571457
1458-
1458+ -- @SkipOnEmptySchemasBegin
14591459WITH rootIdentity as (select EntityId as theIdentity FROM core .Containers WHERE Parent is null )
14601460INSERT INTO targetedms .QCMetricConfiguration (Container, Name,Series1Label,Series1SchemaName,Series1QueryName,Series2Label,Series2SchemaName,Series2QueryName) VALUES
14611461 ((select theIdentity from rootIdentity), ' Retention Time' ,' Retention Time' ,' targetedms' ,' QCMetric_retentionTime' ,NULL , NULL , NULL ),
@@ -1466,6 +1466,7 @@ INSERT INTO targetedms.QCMetricConfiguration (Container, Name,Series1Label,Serie
14661466 ((select theIdentity from rootIdentity), ' Transition/Precursor Area Ratio' ,' Transition/Precursor Area Ratio' ,' targetedms' ,' QCMetric_transitionPrecursorRatio' ,NULL , NULL , NULL ),
14671467 ((select theIdentity from rootIdentity), ' Transition/Precursor Areas' ,' Transition Area' ,' targetedms' ,' QCMetric_transitionArea' ,' Precursor Area' ,' targetedms' ,' QCMetric_precursorArea' ),
14681468 ((select theIdentity from rootIdentity), ' Mass Accuracy' ,' Mass Accuracy' ,' targetedms' ,' QCMetric_massAccuracy' ,NULL , NULL , NULL );
1469+ -- @SkipOnEmptySchemasEnd
14691470
14701471-- Add column to ReplicateAnnotation to store the source of the annotation (e.g. Skyline or AutoQC)
14711472ALTER TABLE targetedms .ReplicateAnnotation ADD COLUMN Source VARCHAR (20 ) NOT NULL DEFAULT ' Skyline' ;
@@ -1800,9 +1801,11 @@ ALTER TABLE targetedms.MeasuredDriftTime ADD IonMobilityUnits VARCHAR(30);
18001801
18011802ALTER TABLE targetedms .Runs ADD COLUMN AuditLogEntriesCount INT4 DEFAULT 0 NOT NULL ;
18021803
1804+ -- @SkipOnEmptySchemasBegin
18031805WITH rootIdentity as (select EntityId as theIdentity FROM core .Containers WHERE Parent is null )
18041806 INSERT INTO targetedms .QCMetricConfiguration (Container, Name,Series1Label,Series1SchemaName,Series1QueryName,Series2Label,Series2SchemaName,Series2QueryName,PrecursorScoped) VALUES
18051807 ((select theIdentity from rootIdentity), ' TIC Area' ,' TIC Area' ,' targetedms' ,' QCRunMetric_ticArea' ,NULL , NULL , NULL , FALSE );
1808+ -- @SkipOnEmptySchemasEnd
18061809
18071810ALTER TABLE targetedms .SampleFile ADD COLUMN TicArea DOUBLE PRECISION ;
18081811
@@ -1860,6 +1863,7 @@ CREATE TABLE targetedms.ListItemValue
18601863ALTER TABLE targetedms .QCMetricConfiguration ADD COLUMN EnabledQueryName VARCHAR (200 );
18611864ALTER TABLE targetedms .QCMetricConfiguration ADD COLUMN EnabledSchemaName VARCHAR (200 );
18621865
1866+ -- @SkipOnEmptySchemasBegin
18631867WITH rootIdentity as (select EntityId as theIdentity FROM core .Containers WHERE Parent is null )
18641868INSERT INTO targetedms .QCMetricConfiguration (Container, Name,Series1Label,Series1SchemaName,Series1QueryName,Series2Label,Series2SchemaName,Series2QueryName,PrecursorScoped, EnabledQueryName, EnabledSchemaName) VALUES
18651869 ((select theIdentity from rootIdentity), ' Isotopologue LOD' , ' LOD' ,' targetedms' , ' QCMetric_IsotopologuePrecursorLOD' , NULL , NULL , NULL , TRUE, ' QCMetricEnabled_IsotopologuePrecursorLOD' , ' targetedms' );
@@ -1877,6 +1881,7 @@ INSERT INTO targetedms.QCMetricConfiguration (Container, Name,Series1Label,Serie
18771881 ((select theIdentity from rootIdentity), ' Isotopologue Regression RSquared' , ' Coefficient' , ' targetedms' , ' QCMetric_IsotopologuePrecursorRSquared' , NULL , NULL , NULL , TRUE, ' QCMetricEnabled_IsotopologuePrecursorRSquared' , ' targetedms' );
18781882
18791883UPDATE targetedms .QCMetricConfiguration SET EnabledQueryName = ' QCMetricEnabled_lhRatio' , EnabledSchemaName = ' targetedms' WHERE Series1QueryName = ' QCMetric_lhRatio' ;
1884+ -- @SkipOnEmptySchemasEnd
18801885
18811886ALTER TABLE targetedms .runs ALTER COLUMN SoftwareVersion TYPE VARCHAR (200 );
18821887
@@ -2229,6 +2234,7 @@ CREATE TABLE targetedms.keywords (
22292234 CONSTRAINT keywords_keywordid_key UNIQUE (keywordid)
22302235);
22312236
2237+ -- @SkipOnEmptySchemasBegin
22322238INSERT INTO targetedms .keywordcategories VALUES (1 , ' KW-9999' , ' Biological process' );
22332239INSERT INTO targetedms .keywordcategories VALUES (2 , ' KW-9998' , ' Cellular component' );
22342240INSERT INTO targetedms .keywordcategories VALUES (3 , ' KW-9997' , ' Coding sequence diversity' );
@@ -3423,6 +3429,7 @@ INSERT INTO targetedms.keywords VALUES ( DEFAULT, 'KW-1268', 'Autism spectrum di
34233429INSERT INTO targetedms .keywords VALUES ( DEFAULT, ' KW-1269' , ' Autism' , ' KW-9995' );
34243430INSERT INTO targetedms .keywords VALUES ( DEFAULT, ' KW-1270' , ' Asperger syndrome' , ' KW-9995' );
34253431INSERT INTO targetedms .keywords VALUES ( DEFAULT, ' KW-1271' , ' Inflammasome' , ' KW-9998' );
3432+ -- @SkipOnEmptySchemasEnd
34263433
34273434ALTER TABLE targetedms .Runs ALTER COLUMN Id TYPE bigint ;
34283435
@@ -3924,6 +3931,7 @@ ALTER TABLE targetedms.SampleFile ADD IRTSlope REAL;
39243931ALTER TABLE targetedms .SampleFile ADD IRTIntercept REAL ;
39253932ALTER TABLE targetedms .SampleFile ADD IRTCorrelation REAL ;
39263933
3934+ -- @SkipOnEmptySchemasBegin
39273935WITH rootIdentity as (select EntityId as theIdentity FROM core .Containers WHERE Parent is null )
39283936INSERT INTO targetedms .QCMetricConfiguration (Container, Name, Series1Label, Series1SchemaName, Series1QueryName, PrecursorScoped, EnabledQueryName, EnabledSchemaName) VALUES
39293937 ((select theIdentity from rootIdentity), ' iRT Slope' , ' iRT Slope' , ' targetedms' , ' QCRunMetric_iRTSlope' , false, ' QCRunMetricEnabled_iRTSlope' , ' targetedms' );
@@ -3943,7 +3951,6 @@ WITH rootIdentity as (select EntityId as theIdentity FROM core.Containers WHERE
39433951INSERT INTO targetedms .QCMetricConfiguration (Container, Name, Series1Label, Series1SchemaName, Series1QueryName, PrecursorScoped) VALUES
39443952 ((select theIdentity from rootIdentity), ' Precursor Area' , ' Precursor Area' , ' targetedms' , ' QCMetric_precursorArea' , true);
39453953
3946-
39473954WITH rootIdentity as (select EntityId as theIdentity FROM core .Containers WHERE Parent is null )
39483955INSERT INTO targetedms .QCMetricConfiguration (Container, Name, Series1Label, Series1SchemaName, Series1QueryName, PrecursorScoped, EnabledQueryName, EnabledSchemaName) VALUES
39493956 ((select theIdentity from rootIdentity), ' Transition Area' , ' Transition Area' , ' targetedms' , ' QCMetric_transitionArea' , true, ' QCMetricEnabled_transitionArea' , ' targetedms' );
@@ -3970,6 +3977,7 @@ SET
39703977 EnabledQueryName = ' QCMetricEnabled_transitionArea' ,
39713978 EnabledSchemaName = ' targetedms'
39723979WHERE Name = ' Transition & Precursor Areas' ;
3980+ -- @SkipOnEmptySchemasEnd
39733981
39743982ALTER TABLE targetedms .PrecursorChromInfo
39753983 ADD COLUMN TotalAreaMs1 REAL ,
@@ -4025,13 +4033,15 @@ SELECT core.fn_dropifexists('AuditLogEntry', 'targetedms', 'CONSTRAINT', 'fk_aud
40254033ALTER TABLE targetedms .AuditLogEntry
40264034DROP COLUMN VersionId;
40274035
4036+ -- @SkipOnEmptySchemasBegin
40284037WITH rootIdentity as (select EntityId as theIdentity FROM core .Containers WHERE Parent is null )
40294038INSERT INTO targetedms .QCMetricConfiguration (Container, Name, Series1Label, Series1SchemaName, Series1QueryName, PrecursorScoped, EnabledQueryName, EnabledSchemaName) VALUES
40304039 ((select theIdentity from rootIdentity), ' Library dotp' , ' Library dotp' , ' targetedms' , ' QCMetric_libraryDotp' , true, ' QCMetricEnabled_libraryDotp' , ' targetedms' );
40314040
40324041WITH rootIdentity as (select EntityId as theIdentity FROM core .Containers WHERE Parent is null )
40334042INSERT INTO targetedms .QCMetricConfiguration (Container, Name, Series1Label, Series1SchemaName, Series1QueryName, PrecursorScoped, EnabledQueryName, EnabledSchemaName) VALUES
40344043 ((select theIdentity from rootIdentity), ' Isotope dotp' , ' Isotope dotp' , ' targetedms' , ' QCMetric_isotopeDotp' , true, ' QCMetricEnabled_isotopeDotp' , ' targetedms' );
4044+ -- @SkipOnEmptySchemasEnd
40354045
40364046-- Reparent table if it exists in PanoramaPremium schema
40374047ALTER TABLE IF EXISTS PanoramaPremium .QCEmailNotifications SET SCHEMA targetedms;
0 commit comments