From ef716a77d1f28df1c37a2e58e804dfd591d6836a Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Sat, 1 Aug 2020 10:20:56 -0700 Subject: [PATCH 1/2] Consolidate bootstrap scripts to 0.00-18.20.sql --- ...00-18.10.sql => targetedms-0.00-18.20.sql} | 34 +++++++++++- .../postgresql/targetedms-18.10-18.20.sql | 55 ------------------- 2 files changed, 33 insertions(+), 56 deletions(-) rename resources/schemas/dbscripts/postgresql/{targetedms-0.00-18.10.sql => targetedms-0.00-18.20.sql} (97%) delete mode 100644 resources/schemas/dbscripts/postgresql/targetedms-18.10-18.20.sql diff --git a/resources/schemas/dbscripts/postgresql/targetedms-0.00-18.10.sql b/resources/schemas/dbscripts/postgresql/targetedms-0.00-18.20.sql similarity index 97% rename from resources/schemas/dbscripts/postgresql/targetedms-0.00-18.10.sql rename to resources/schemas/dbscripts/postgresql/targetedms-0.00-18.20.sql index 96d0d4107..5a2cd5882 100644 --- a/resources/schemas/dbscripts/postgresql/targetedms-0.00-18.10.sql +++ b/resources/schemas/dbscripts/postgresql/targetedms-0.00-18.20.sql @@ -1699,4 +1699,36 @@ ALTER TABLE targetedms.TransitionChromInfo ADD COLUMN PointsAcrossPeak INT; /* targetedms-17.30-18.10.sql */ -ALTER TABLE targetedms.ReplicateAnnotation ALTER COLUMN Value TYPE VARCHAR(500); \ No newline at end of file +ALTER TABLE targetedms.ReplicateAnnotation ALTER COLUMN Value TYPE VARCHAR(500); + +/* targetedms-18.10-18.20.sql */ + +ALTER TABLE targetedms.Runs ADD COLUMN SkydDataId INT; + +ALTER TABLE targetedms.Runs ADD CONSTRAINT FK_Runs_SkydData FOREIGN KEY (SkydDataId) REFERENCES exp.Data(RowId); + + +ALTER TABLE targetedms.PrecursorChromInfo ADD COLUMN ChromatogramOffset BIGINT; +ALTER TABLE targetedms.PrecursorChromInfo ADD COLUMN ChromatogramLength INT; + +ALTER TABLE targetedms.Runs ADD COLUMN CalibrationCurveCount INT; +UPDATE targetedms.Runs SET CalibrationCurveCount = (SELECT COUNT(c.id) FROM targetedms.CalibrationCurve c WHERE c.RunId = targetedms.Runs.Id); + +ALTER TABLE targetedms.GeneralMoleculeChromInfo ADD COLUMN ExcludeFromCalibration BOOLEAN; +UPDATE targetedms.GeneralMoleculeChromInfo SET ExcludeFromCalibration = false; + +ALTER TABLE targetedms.QuantificationSettings ADD COLUMN MaxLOQBias FLOAT; +ALTER TABLE targetedms.QuantificationSettings ADD COLUMN MaxLOQCV FLOAT; +ALTER TABLE targetedms.QuantificationSettings ADD COLUMN LODCalculation VARCHAR(50); + +ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN Keywords VARCHAR(200); +ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN LabHead USERID; +ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN LabHeadAffiliation VARCHAR(200); +ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN Submitter USERID; +ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN SubmitterAffiliation VARCHAR(200); +ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN pxid VARCHAR(10); + +ALTER TABLE targetedms.JournalExperiment ADD COLUMN PxidRequested BOOLEAN NOT NULL DEFAULT '0'; +ALTER TABLE targetedms.JournalExperiment ADD COLUMN KeepPrivate BOOLEAN NOT NULL DEFAULT '1'; + +ALTER TABLE targetedms.spectrumlibrary ALTER COLUMN Name TYPE VARCHAR(400); \ No newline at end of file diff --git a/resources/schemas/dbscripts/postgresql/targetedms-18.10-18.20.sql b/resources/schemas/dbscripts/postgresql/targetedms-18.10-18.20.sql deleted file mode 100644 index 30e80ecef..000000000 --- a/resources/schemas/dbscripts/postgresql/targetedms-18.10-18.20.sql +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2018-2019 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* targetedms-18.10-18.11.sql */ - -ALTER TABLE targetedms.Runs ADD COLUMN SkydDataId INT; - -ALTER TABLE targetedms.Runs ADD CONSTRAINT FK_Runs_SkydData FOREIGN KEY (SkydDataId) REFERENCES exp.Data(RowId); - - -ALTER TABLE targetedms.PrecursorChromInfo ADD COLUMN ChromatogramOffset BIGINT; -ALTER TABLE targetedms.PrecursorChromInfo ADD COLUMN ChromatogramLength INT; - -/* targetedms-18.11-18.12.sql */ - -ALTER TABLE targetedms.Runs ADD COLUMN CalibrationCurveCount INT; -UPDATE targetedms.Runs SET CalibrationCurveCount = (SELECT COUNT(c.id) FROM targetedms.CalibrationCurve c WHERE c.RunId = targetedms.Runs.Id); - -ALTER TABLE targetedms.GeneralMoleculeChromInfo ADD COLUMN ExcludeFromCalibration BOOLEAN; -UPDATE targetedms.GeneralMoleculeChromInfo SET ExcludeFromCalibration = false; - -/* targetedms-18.12-18.13.sql */ - -ALTER TABLE targetedms.QuantificationSettings ADD COLUMN MaxLOQBias FLOAT; -ALTER TABLE targetedms.QuantificationSettings ADD COLUMN MaxLOQCV FLOAT; -ALTER TABLE targetedms.QuantificationSettings ADD COLUMN LODCalculation VARCHAR(50); - -/* targetedms-18.13-18.14.sql */ - -ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN Keywords VARCHAR(200); -ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN LabHead USERID; -ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN LabHeadAffiliation VARCHAR(200); -ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN Submitter USERID; -ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN SubmitterAffiliation VARCHAR(200); -ALTER TABLE targetedms.ExperimentAnnotations ADD COLUMN pxid VARCHAR(10); - -ALTER TABLE targetedms.JournalExperiment ADD COLUMN PxidRequested BOOLEAN NOT NULL DEFAULT '0'; -ALTER TABLE targetedms.JournalExperiment ADD COLUMN KeepPrivate BOOLEAN NOT NULL DEFAULT '1'; - -/* targetedms-18.14-18.15.sql */ - -ALTER TABLE targetedms.spectrumlibrary ALTER COLUMN Name TYPE VARCHAR(400); \ No newline at end of file From a3f5cf6f9c1a0b350a4b3eb634cd1261706b22e6 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Sun, 2 Aug 2020 16:29:30 -0700 Subject: [PATCH 2/2] Consolidate SQL Server bootstrap scripts to 0.00-18.20.sql --- ...00-18.10.sql => targetedms-0.00-18.20.sql} | 40 ++++++++++++- .../sqlserver/targetedms-18.10-18.20.sql | 60 ------------------- 2 files changed, 39 insertions(+), 61 deletions(-) rename resources/schemas/dbscripts/sqlserver/{targetedms-0.00-18.10.sql => targetedms-0.00-18.20.sql} (97%) delete mode 100644 resources/schemas/dbscripts/sqlserver/targetedms-18.10-18.20.sql diff --git a/resources/schemas/dbscripts/sqlserver/targetedms-0.00-18.10.sql b/resources/schemas/dbscripts/sqlserver/targetedms-0.00-18.20.sql similarity index 97% rename from resources/schemas/dbscripts/sqlserver/targetedms-0.00-18.10.sql rename to resources/schemas/dbscripts/sqlserver/targetedms-0.00-18.20.sql index b0effd4ab..a421eb0c1 100644 --- a/resources/schemas/dbscripts/sqlserver/targetedms-0.00-18.10.sql +++ b/resources/schemas/dbscripts/sqlserver/targetedms-0.00-18.20.sql @@ -1842,4 +1842,42 @@ ALTER TABLE targetedms.TransitionChromInfo ADD PointsAcrossPeak INT; /* targetedms-17.30-18.10.sql */ -ALTER TABLE targetedms.ReplicateAnnotation ALTER COLUMN Value NVARCHAR(500); \ No newline at end of file +ALTER TABLE targetedms.ReplicateAnnotation ALTER COLUMN Value NVARCHAR(500); + +/* targetedms-18.10-18.20.sql */ + +ALTER TABLE targetedms.Runs ADD SkydDataId INT; + +ALTER TABLE targetedms.Runs ADD CONSTRAINT FK_Runs_SkydData FOREIGN KEY (SkydDataId) REFERENCES exp.Data(RowId); + +ALTER TABLE targetedms.PrecursorChromInfo ADD ChromatogramOffset BIGINT; +ALTER TABLE targetedms.PrecursorChromInfo ADD ChromatogramLength INT; + +ALTER TABLE targetedms.Runs ADD CalibrationCurveCount INT; + +GO + +UPDATE targetedms.Runs SET CalibrationCurveCount = (SELECT COUNT(c.id) FROM targetedms.CalibrationCurve c WHERE c.RunId = targetedms.Runs.Id); + +ALTER TABLE targetedms.GeneralMoleculeChromInfo ADD ExcludeFromCalibration BIT; + +GO + +UPDATE targetedms.GeneralMoleculeChromInfo SET ExcludeFromCalibration = 0; + +ALTER TABLE targetedms.QuantificationSettings ADD MaxLOQBias FLOAT; +ALTER TABLE targetedms.QuantificationSettings ADD MaxLOQCV FLOAT; +ALTER TABLE targetedms.QuantificationSettings ADD LODCalculation NVARCHAR(50); + +ALTER TABLE targetedms.ExperimentAnnotations ADD Keywords NVARCHAR(200); +ALTER TABLE targetedms.ExperimentAnnotations ADD LabHead USERID; +ALTER TABLE targetedms.ExperimentAnnotations ADD LabHeadAffiliation NVARCHAR(200); +ALTER TABLE targetedms.ExperimentAnnotations ADD Submitter USERID; +ALTER TABLE targetedms.ExperimentAnnotations ADD SubmitterAffiliation NVARCHAR(200); +ALTER TABLE targetedms.ExperimentAnnotations ADD pxid NVARCHAR(10); + +ALTER TABLE targetedms.JournalExperiment ADD PxidRequested BIT NOT NULL DEFAULT '0'; +ALTER TABLE targetedms.JournalExperiment ADD KeepPrivate BIT NOT NULL DEFAULT '1'; + +ALTER TABLE targetedms.spectrumlibrary ALTER COLUMN Name NVARCHAR(400); +GO \ No newline at end of file diff --git a/resources/schemas/dbscripts/sqlserver/targetedms-18.10-18.20.sql b/resources/schemas/dbscripts/sqlserver/targetedms-18.10-18.20.sql deleted file mode 100644 index 46d80441e..000000000 --- a/resources/schemas/dbscripts/sqlserver/targetedms-18.10-18.20.sql +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2018 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* targetedms-18.10-18.11.sql */ - -ALTER TABLE targetedms.Runs ADD SkydDataId INT; - -ALTER TABLE targetedms.Runs ADD CONSTRAINT FK_Runs_SkydData FOREIGN KEY (SkydDataId) REFERENCES exp.Data(RowId); - -ALTER TABLE targetedms.PrecursorChromInfo ADD ChromatogramOffset BIGINT; -ALTER TABLE targetedms.PrecursorChromInfo ADD ChromatogramLength INT; - -/* targetedms-18.11-18.12.sql */ - -ALTER TABLE targetedms.Runs ADD CalibrationCurveCount INT; - -GO - -UPDATE targetedms.Runs SET CalibrationCurveCount = (SELECT COUNT(c.id) FROM targetedms.CalibrationCurve c WHERE c.RunId = targetedms.Runs.Id); - -ALTER TABLE targetedms.GeneralMoleculeChromInfo ADD ExcludeFromCalibration BIT; - -GO - -UPDATE targetedms.GeneralMoleculeChromInfo SET ExcludeFromCalibration = 0; - -/* targetedms-18.12-18.13.sql */ - -ALTER TABLE targetedms.QuantificationSettings ADD MaxLOQBias FLOAT; -ALTER TABLE targetedms.QuantificationSettings ADD MaxLOQCV FLOAT; -ALTER TABLE targetedms.QuantificationSettings ADD LODCalculation NVARCHAR(50); - -/* targetedms-18.13-18.14.sql */ - -ALTER TABLE targetedms.ExperimentAnnotations ADD Keywords NVARCHAR(200); -ALTER TABLE targetedms.ExperimentAnnotations ADD LabHead USERID; -ALTER TABLE targetedms.ExperimentAnnotations ADD LabHeadAffiliation NVARCHAR(200); -ALTER TABLE targetedms.ExperimentAnnotations ADD Submitter USERID; -ALTER TABLE targetedms.ExperimentAnnotations ADD SubmitterAffiliation NVARCHAR(200); -ALTER TABLE targetedms.ExperimentAnnotations ADD pxid NVARCHAR(10); - -ALTER TABLE targetedms.JournalExperiment ADD PxidRequested BIT NOT NULL DEFAULT '0'; -ALTER TABLE targetedms.JournalExperiment ADD KeepPrivate BIT NOT NULL DEFAULT '1'; - -/* targetedms-18.14-18.15.sql */ - -ALTER TABLE targetedms.spectrumlibrary ALTER COLUMN Name NVARCHAR(400); \ No newline at end of file