From 21d7bd3e206e295038e9758f3c2e02ffb1163453 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Sat, 1 Aug 2020 10:21:01 -0700 Subject: [PATCH 1/4] Consolidate bootstrap scripts to 0.00-18.20.sql --- ...omm-0.00-15.10.sql => comm-0.00-18.20.sql} | 6 ++ .../dbscripts/postgresql/comm-18.10-18.20.sql | 20 ------- api/src/org/labkey/api/Constants.java | 10 +++- .../security/ProjectAndSiteGroupsCache.java | 3 +- ...ore-0.00-18.10.sql => core-0.00-18.20.sql} | 6 +- .../dbscripts/postgresql/core-18.10-18.20.sql | 19 ------ ...{exp-0.00-18.10.sql => exp-0.00-18.20.sql} | 40 ++++++++++++- .../dbscripts/postgresql/exp-18.10-18.20.sql | 58 ------------------- .../dbscripts/postgresql/exp-18.11-18.20.sql | 54 ----------------- .../dbscripts/postgresql/required_scripts.txt | 1 - ...0.00-18.10.sql => pipeline-0.00-18.20.sql} | 18 +++++- .../postgresql/pipeline-18.10-18.20.sql | 31 ---------- ...dy-0.00-18.10.sql => study-0.00-18.20.sql} | 4 ++ .../postgresql/study-18.10-18.20.sql | 19 ------ 14 files changed, 82 insertions(+), 207 deletions(-) rename announcements/resources/schemas/dbscripts/postgresql/{comm-0.00-15.10.sql => comm-0.00-18.20.sql} (97%) delete mode 100644 announcements/resources/schemas/dbscripts/postgresql/comm-18.10-18.20.sql rename core/resources/schemas/dbscripts/postgresql/{core-0.00-18.10.sql => core-0.00-18.20.sql} (99%) delete mode 100644 core/resources/schemas/dbscripts/postgresql/core-18.10-18.20.sql rename experiment/resources/schemas/dbscripts/postgresql/{exp-0.00-18.10.sql => exp-0.00-18.20.sql} (97%) delete mode 100644 experiment/resources/schemas/dbscripts/postgresql/exp-18.10-18.20.sql delete mode 100644 experiment/resources/schemas/dbscripts/postgresql/exp-18.11-18.20.sql delete mode 100644 experiment/resources/schemas/dbscripts/postgresql/required_scripts.txt rename pipeline/resources/schemas/dbscripts/postgresql/{pipeline-0.00-18.10.sql => pipeline-0.00-18.20.sql} (86%) delete mode 100644 pipeline/resources/schemas/dbscripts/postgresql/pipeline-18.10-18.20.sql rename study/resources/schemas/dbscripts/postgresql/{study-0.00-18.10.sql => study-0.00-18.20.sql} (99%) delete mode 100644 study/resources/schemas/dbscripts/postgresql/study-18.10-18.20.sql diff --git a/announcements/resources/schemas/dbscripts/postgresql/comm-0.00-15.10.sql b/announcements/resources/schemas/dbscripts/postgresql/comm-0.00-18.20.sql similarity index 97% rename from announcements/resources/schemas/dbscripts/postgresql/comm-0.00-15.10.sql rename to announcements/resources/schemas/dbscripts/postgresql/comm-0.00-18.20.sql index 36ffb6b5c37..20635e0e82d 100644 --- a/announcements/resources/schemas/dbscripts/postgresql/comm-0.00-15.10.sql +++ b/announcements/resources/schemas/dbscripts/postgresql/comm-0.00-18.20.sql @@ -197,3 +197,9 @@ CREATE TABLE comm.Tours CONSTRAINT PK_ToursId PRIMARY KEY (RowId) ); + +/* comm-18.10-18.20.sql */ + +ALTER TABLE comm.Announcements ADD COLUMN Approved TIMESTAMP NULL; + +UPDATE comm.Announcements SET Approved = Created; \ No newline at end of file diff --git a/announcements/resources/schemas/dbscripts/postgresql/comm-18.10-18.20.sql b/announcements/resources/schemas/dbscripts/postgresql/comm-18.10-18.20.sql deleted file mode 100644 index 533dc74d83f..00000000000 --- a/announcements/resources/schemas/dbscripts/postgresql/comm-18.10-18.20.sql +++ /dev/null @@ -1,20 +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. - */ -/* comm-18.10-18.11.sql */ - -ALTER TABLE comm.Announcements ADD COLUMN Approved TIMESTAMP NULL; - -UPDATE comm.Announcements SET Approved = Created; \ No newline at end of file diff --git a/api/src/org/labkey/api/Constants.java b/api/src/org/labkey/api/Constants.java index df0d11eb0ba..d2e47d767ee 100644 --- a/api/src/org/labkey/api/Constants.java +++ b/api/src/org/labkey/api/Constants.java @@ -40,7 +40,7 @@ public class Constants */ public static double getEarliestUpgradeVersion() { - return 18.1; + return 18.2; } /** @@ -77,6 +77,14 @@ public static int getMaxContainers() return 100_000; } + /** + * Returns the maximum number of projects supported by the system + */ + public static int getMaxProjects() + { + return 1000; + } + public static Collection getMajorSchemaVersions() { return SCHEMA_VERSIONS; diff --git a/api/src/org/labkey/api/security/ProjectAndSiteGroupsCache.java b/api/src/org/labkey/api/security/ProjectAndSiteGroupsCache.java index f8720e68298..a23b6c3b2fe 100644 --- a/api/src/org/labkey/api/security/ProjectAndSiteGroupsCache.java +++ b/api/src/org/labkey/api/security/ProjectAndSiteGroupsCache.java @@ -16,6 +16,7 @@ package org.labkey.api.security; import org.jetbrains.annotations.NotNull; +import org.labkey.api.Constants; import org.labkey.api.cache.BlockingCache; import org.labkey.api.cache.CacheLoader; import org.labkey.api.cache.CacheManager; @@ -40,7 +41,7 @@ public class ProjectAndSiteGroupsCache { private static final CoreSchema CORE = CoreSchema.getInstance(); - private static final BlockingCache> CACHE = CacheManager.getBlockingCache(1000, CacheManager.DAY, "Project Groups", null); + private static final BlockingCache> CACHE = CacheManager.getBlockingCache(Constants.getMaxProjects(), CacheManager.DAY, "Project Groups", null); private static final CacheLoader> GROUP_LIST_LOADER = (c, argument) -> { String containerClause = c.isRoot() ? "IS NULL" : "= ?"; diff --git a/core/resources/schemas/dbscripts/postgresql/core-0.00-18.10.sql b/core/resources/schemas/dbscripts/postgresql/core-0.00-18.20.sql similarity index 99% rename from core/resources/schemas/dbscripts/postgresql/core-0.00-18.10.sql rename to core/resources/schemas/dbscripts/postgresql/core-0.00-18.20.sql index 6c74596eafb..202d8615ec5 100644 --- a/core/resources/schemas/dbscripts/postgresql/core-0.00-18.10.sql +++ b/core/resources/schemas/dbscripts/postgresql/core-0.00-18.20.sql @@ -613,4 +613,8 @@ ALTER TABLE core.APIKeys ADD COLUMN RowId SERIAL, DROP CONSTRAINT PK_APIKeys, ADD CONSTRAINT PK_APIKeys PRIMARY KEY (RowId), - ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt); \ No newline at end of file + ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt); + +/* core-18.10-18.20.sql */ + +SELECT core.executeJavaUpgradeCode('encryptMappedDrivePassword'); \ No newline at end of file diff --git a/core/resources/schemas/dbscripts/postgresql/core-18.10-18.20.sql b/core/resources/schemas/dbscripts/postgresql/core-18.10-18.20.sql deleted file mode 100644 index 590c732a84c..00000000000 --- a/core/resources/schemas/dbscripts/postgresql/core-18.10-18.20.sql +++ /dev/null @@ -1,19 +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. - */ - -/* core-18.10-18.11.sql */ - -SELECT core.executeJavaUpgradeCode('encryptMappedDrivePassword'); \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.10.sql b/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.20.sql similarity index 97% rename from experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.10.sql rename to experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.20.sql index 7ec4c2a3fa3..8829ad3e739 100644 --- a/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.10.sql +++ b/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.20.sql @@ -1210,4 +1210,42 @@ CREATE TABLE exp.Edge CONSTRAINT FK_Edge_ToLsid_Object FOREIGN KEY (ToLsid) REFERENCES exp.object (objecturi), CONSTRAINT FK_Edge_RunId_Run FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId), CONSTRAINT UQ_Edge_FromLsid_ToLsid_RunId UNIQUE (FromLsid, ToLsid, RunId) -); \ No newline at end of file +); + +/* exp-18.10-18.20.sql */ + +SELECT core.executeJavaUpgradeCode('rebuildAllEdges'); + +ALTER TABLE exp.propertydescriptor + ADD TextExpression varchar(200) NULL; + +CREATE TABLE exp.Exclusions +( + RowId SERIAL NOT NULL, + RunId INT NOT NULL, + Comment TEXT NULL, + Created TIMESTAMP NULL, + CreatedBy INT NULL, + Modified TIMESTAMP NULL, + ModifiedBy INT NULL, + CONSTRAINT PK_Exclusion_RowId PRIMARY KEY (RowId), + CONSTRAINT FK_Exclusion_RunId FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId) +); +CREATE INDEX IX_Exclusion_RunId ON exp.Exclusions(RunId); + +CREATE TABLE exp.ExclusionMaps +( + RowId SERIAL NOT NULL, + ExclusionId INT NOT NULL, + DataRowId INT NOT NULL, + Created TIMESTAMP NULL, + CreatedBy INT NULL, + Modified TIMESTAMP NULL, + ModifiedBy INT NULL, + CONSTRAINT PK_ExclusionMap_RowId PRIMARY KEY (RowId), + CONSTRAINT FK_ExclusionMap_ExclusionId FOREIGN KEY (ExclusionId) REFERENCES exp.Exclusions (RowId), + CONSTRAINT UQ_ExclusionMap_ExclusionId_DataId UNIQUE (ExclusionId, DataRowId) +); + +ALTER TABLE exp.DomainDescriptor ALTER COLUMN DomainURI TYPE VARCHAR(300); +ALTER TABLE exp.PropertyDescriptor ALTER COLUMN PropertyURI TYPE VARCHAR(300); \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/postgresql/exp-18.10-18.20.sql b/experiment/resources/schemas/dbscripts/postgresql/exp-18.10-18.20.sql deleted file mode 100644 index 673468651c8..00000000000 --- a/experiment/resources/schemas/dbscripts/postgresql/exp-18.10-18.20.sql +++ /dev/null @@ -1,58 +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. - */ -/* exp-18.10-18.11.sql */ - -SELECT core.executeJavaUpgradeCode('rebuildAllEdges'); - -/* exp-18.11-18.12.sql */ - -ALTER TABLE exp.propertydescriptor - ADD TextExpression varchar(200) NULL; - -/* exp-18.12-18.13.sql */ - -CREATE TABLE exp.Exclusions -( - RowId SERIAL NOT NULL, - RunId INT NOT NULL, - Comment TEXT NULL, - Created TIMESTAMP NULL, - CreatedBy INT NULL, - Modified TIMESTAMP NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_Exclusion_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_Exclusion_RunId FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId) -); -CREATE INDEX IX_Exclusion_RunId ON exp.Exclusions(RunId); - -CREATE TABLE exp.ExclusionMaps -( - RowId SERIAL NOT NULL, - ExclusionId INT NOT NULL, - DataRowId INT NOT NULL, - Created TIMESTAMP NULL, - CreatedBy INT NULL, - Modified TIMESTAMP NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_ExclusionMap_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_ExclusionMap_ExclusionId FOREIGN KEY (ExclusionId) REFERENCES exp.Exclusions (RowId), - CONSTRAINT UQ_ExclusionMap_ExclusionId_DataId UNIQUE (ExclusionId, DataRowId) -); - -/* exp-18.13-18.14.sql */ - -ALTER TABLE exp.DomainDescriptor ALTER COLUMN DomainURI TYPE VARCHAR(300); -ALTER TABLE exp.PropertyDescriptor ALTER COLUMN PropertyURI TYPE VARCHAR(300); \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/postgresql/exp-18.11-18.20.sql b/experiment/resources/schemas/dbscripts/postgresql/exp-18.11-18.20.sql deleted file mode 100644 index 553f433a5d4..00000000000 --- a/experiment/resources/schemas/dbscripts/postgresql/exp-18.11-18.20.sql +++ /dev/null @@ -1,54 +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. - */ -/* exp-18.11-18.12.sql */ - -ALTER TABLE exp.propertydescriptor - ADD TextExpression varchar(200) NULL; - -/* exp-18.12-18.13.sql */ - -CREATE TABLE exp.Exclusions -( - RowId SERIAL NOT NULL, - RunId INT NOT NULL, - Comment TEXT NULL, - Created TIMESTAMP NULL, - CreatedBy INT NULL, - Modified TIMESTAMP NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_Exclusion_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_Exclusion_RunId FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId) -); -CREATE INDEX IX_Exclusion_RunId ON exp.Exclusions(RunId); - -CREATE TABLE exp.ExclusionMaps -( - RowId SERIAL NOT NULL, - ExclusionId INT NOT NULL, - DataRowId INT NOT NULL, - Created TIMESTAMP NULL, - CreatedBy INT NULL, - Modified TIMESTAMP NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_ExclusionMap_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_ExclusionMap_ExclusionId FOREIGN KEY (ExclusionId) REFERENCES exp.Exclusions (RowId), - CONSTRAINT UQ_ExclusionMap_ExclusionId_DataId UNIQUE (ExclusionId, DataRowId) -); - -/* exp-18.13-18.14.sql */ - -ALTER TABLE exp.DomainDescriptor ALTER COLUMN DomainURI TYPE VARCHAR(300); -ALTER TABLE exp.PropertyDescriptor ALTER COLUMN PropertyURI TYPE VARCHAR(300); \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/postgresql/required_scripts.txt b/experiment/resources/schemas/dbscripts/postgresql/required_scripts.txt deleted file mode 100644 index 2530d008524..00000000000 --- a/experiment/resources/schemas/dbscripts/postgresql/required_scripts.txt +++ /dev/null @@ -1 +0,0 @@ -exp-18.11-18.20.sql diff --git a/pipeline/resources/schemas/dbscripts/postgresql/pipeline-0.00-18.10.sql b/pipeline/resources/schemas/dbscripts/postgresql/pipeline-0.00-18.20.sql similarity index 86% rename from pipeline/resources/schemas/dbscripts/postgresql/pipeline-0.00-18.10.sql rename to pipeline/resources/schemas/dbscripts/postgresql/pipeline-0.00-18.20.sql index f09c5d2ad37..f2c468ae84a 100644 --- a/pipeline/resources/schemas/dbscripts/postgresql/pipeline-0.00-18.10.sql +++ b/pipeline/resources/schemas/dbscripts/postgresql/pipeline-0.00-18.20.sql @@ -126,4 +126,20 @@ CREATE TABLE pipeline.TriggerConfigurations /* pipeline-17.30-18.10.sql */ -ALTER TABLE pipeline.TriggerConfigurations ADD COLUMN customConfiguration TEXT; \ No newline at end of file +ALTER TABLE pipeline.TriggerConfigurations ADD COLUMN customConfiguration TEXT; + +/* pipeline-18.10-18.20.sql */ + +CREATE TABLE pipeline.TriggeredFiles +( + RowId SERIAL NOT NULL, + Container ENTITYID NOT NULL, + TriggerId INTEGER NOT NULL, + FilePath VARCHAR(1000) NOT NULL, + LastRun TIMESTAMP, + + CONSTRAINT PK_TriggeredFiles PRIMARY KEY (RowId), + CONSTRAINT FK_TriggeredFiles_TriggerId FOREIGN KEY (TriggerId) REFERENCES pipeline.TriggerConfigurations(RowId), + CONSTRAINT FK_TriggeredFiles_Container FOREIGN KEY (Container) REFERENCES core.Containers (ENTITYID), + CONSTRAINT UQ_TriggeredFiles_Container_TriggerId_FilePath UNIQUE (Container, TriggerId, FilePath) +); \ No newline at end of file diff --git a/pipeline/resources/schemas/dbscripts/postgresql/pipeline-18.10-18.20.sql b/pipeline/resources/schemas/dbscripts/postgresql/pipeline-18.10-18.20.sql deleted file mode 100644 index be1a318ef0e..00000000000 --- a/pipeline/resources/schemas/dbscripts/postgresql/pipeline-18.10-18.20.sql +++ /dev/null @@ -1,31 +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. - */ - -/* pipeline-18.10-18.11.sql */ - -CREATE TABLE pipeline.TriggeredFiles -( - RowId SERIAL NOT NULL, - Container ENTITYID NOT NULL, - TriggerId INTEGER NOT NULL, - FilePath VARCHAR(1000) NOT NULL, - LastRun TIMESTAMP, - - CONSTRAINT PK_TriggeredFiles PRIMARY KEY (RowId), - CONSTRAINT FK_TriggeredFiles_TriggerId FOREIGN KEY (TriggerId) REFERENCES pipeline.TriggerConfigurations(RowId), - CONSTRAINT FK_TriggeredFiles_Container FOREIGN KEY (Container) REFERENCES core.Containers (ENTITYID), - CONSTRAINT UQ_TriggeredFiles_Container_TriggerId_FilePath UNIQUE (Container, TriggerId, FilePath) -); \ No newline at end of file diff --git a/study/resources/schemas/dbscripts/postgresql/study-0.00-18.10.sql b/study/resources/schemas/dbscripts/postgresql/study-0.00-18.20.sql similarity index 99% rename from study/resources/schemas/dbscripts/postgresql/study-0.00-18.10.sql rename to study/resources/schemas/dbscripts/postgresql/study-0.00-18.20.sql index b5581a2219e..b4fc4a848f2 100644 --- a/study/resources/schemas/dbscripts/postgresql/study-0.00-18.10.sql +++ b/study/resources/schemas/dbscripts/postgresql/study-0.00-18.20.sql @@ -1519,3 +1519,7 @@ SELECT core.fn_dropifexists('ParticipantVisit', 'study', 'INDEX', 'ix_participan --For Resync perf CREATE INDEX ix_participantvisit_sequencenum ON study.participantvisit (container, participantid, sequencenum, ParticipantSequenceNum); CREATE INDEX ix_participantvisit_visitrowid ON study.participantvisit (visitrowid); + +/* study-18.10-18.20.sql */ + +ALTER TABLE study.Dataset ALTER COLUMN TypeURI TYPE VARCHAR(300); \ No newline at end of file diff --git a/study/resources/schemas/dbscripts/postgresql/study-18.10-18.20.sql b/study/resources/schemas/dbscripts/postgresql/study-18.10-18.20.sql deleted file mode 100644 index d151dec22c5..00000000000 --- a/study/resources/schemas/dbscripts/postgresql/study-18.10-18.20.sql +++ /dev/null @@ -1,19 +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. - */ - -/* study-18.10-18.11.sql */ - -ALTER TABLE study.Dataset ALTER COLUMN TypeURI TYPE VARCHAR(300); \ No newline at end of file From 7c725a7f13346e4ae9bd607e4e490917f11115a7 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Sun, 2 Aug 2020 16:29:36 -0700 Subject: [PATCH 2/4] Consolidate SQL Server bootstrap scripts to 0.00-18.20.sql --- ...omm-0.00-15.10.sql => comm-0.00-18.20.sql} | 7 +++ .../dbscripts/sqlserver/comm-18.10-18.20.sql | 21 ------- ...ore-0.00-18.10.sql => core-0.00-18.20.sql} | 6 +- .../dbscripts/sqlserver/core-18.10-18.20.sql | 19 ------ ...{exp-0.00-18.10.sql => exp-0.00-18.20.sql} | 40 ++++++++++++- .../dbscripts/sqlserver/exp-18.10-18.20.sql | 58 ------------------- .../dbscripts/sqlserver/exp-18.11-18.20.sql | 54 ----------------- .../dbscripts/sqlserver/required_scripts.txt | 1 - ...0.00-18.10.sql => pipeline-0.00-18.20.sql} | 18 +++++- .../sqlserver/pipeline-18.10-18.20.sql | 31 ---------- ...dy-0.00-18.10.sql => study-0.00-18.20.sql} | 4 ++ .../dbscripts/sqlserver/study-18.10-18.20.sql | 18 ------ 12 files changed, 72 insertions(+), 205 deletions(-) rename announcements/resources/schemas/dbscripts/sqlserver/{comm-0.00-15.10.sql => comm-0.00-18.20.sql} (97%) delete mode 100644 announcements/resources/schemas/dbscripts/sqlserver/comm-18.10-18.20.sql rename core/resources/schemas/dbscripts/sqlserver/{core-0.00-18.10.sql => core-0.00-18.20.sql} (99%) delete mode 100644 core/resources/schemas/dbscripts/sqlserver/core-18.10-18.20.sql rename experiment/resources/schemas/dbscripts/sqlserver/{exp-0.00-18.10.sql => exp-0.00-18.20.sql} (97%) delete mode 100644 experiment/resources/schemas/dbscripts/sqlserver/exp-18.10-18.20.sql delete mode 100644 experiment/resources/schemas/dbscripts/sqlserver/exp-18.11-18.20.sql delete mode 100644 experiment/resources/schemas/dbscripts/sqlserver/required_scripts.txt rename pipeline/resources/schemas/dbscripts/sqlserver/{pipeline-0.00-18.10.sql => pipeline-0.00-18.20.sql} (86%) delete mode 100644 pipeline/resources/schemas/dbscripts/sqlserver/pipeline-18.10-18.20.sql rename study/resources/schemas/dbscripts/sqlserver/{study-0.00-18.10.sql => study-0.00-18.20.sql} (99%) delete mode 100644 study/resources/schemas/dbscripts/sqlserver/study-18.10-18.20.sql diff --git a/announcements/resources/schemas/dbscripts/sqlserver/comm-0.00-15.10.sql b/announcements/resources/schemas/dbscripts/sqlserver/comm-0.00-18.20.sql similarity index 97% rename from announcements/resources/schemas/dbscripts/sqlserver/comm-0.00-15.10.sql rename to announcements/resources/schemas/dbscripts/sqlserver/comm-0.00-18.20.sql index 2fe890c34ac..84ff4302359 100644 --- a/announcements/resources/schemas/dbscripts/sqlserver/comm-0.00-15.10.sql +++ b/announcements/resources/schemas/dbscripts/sqlserver/comm-0.00-18.20.sql @@ -196,3 +196,10 @@ CREATE TABLE comm.Tours CONSTRAINT PK_ToursId PRIMARY KEY (RowId) ); + +/* comm-18.10-18.20.sql */ + +ALTER TABLE comm.Announcements ADD Approved DATETIME NULL; +GO + +UPDATE comm.Announcements SET Approved = Created; \ No newline at end of file diff --git a/announcements/resources/schemas/dbscripts/sqlserver/comm-18.10-18.20.sql b/announcements/resources/schemas/dbscripts/sqlserver/comm-18.10-18.20.sql deleted file mode 100644 index 4c24b79d390..00000000000 --- a/announcements/resources/schemas/dbscripts/sqlserver/comm-18.10-18.20.sql +++ /dev/null @@ -1,21 +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. - */ -/* comm-18.10-18.11.sql */ - -ALTER TABLE comm.Announcements ADD Approved DATETIME NULL; -GO - -UPDATE comm.Announcements SET Approved = Created; \ No newline at end of file diff --git a/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.10.sql b/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.20.sql similarity index 99% rename from core/resources/schemas/dbscripts/sqlserver/core-0.00-18.10.sql rename to core/resources/schemas/dbscripts/sqlserver/core-0.00-18.20.sql index 1f8ce6719c7..e60653c8ac5 100644 --- a/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.10.sql +++ b/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.20.sql @@ -818,4 +818,8 @@ CREATE TABLE core.APIKeys ALTER TABLE core.APIKeys ADD RowId INT IDENTITY(1, 1); ALTER TABLE core.APIKeys DROP CONSTRAINT PK_APIKeys; ALTER TABLE core.APIKeys ADD CONSTRAINT PK_APIKeys PRIMARY KEY (RowId); -ALTER TABLE core.APIKeys ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt); \ No newline at end of file +ALTER TABLE core.APIKeys ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt); + +/* core-18.10-18.20.sql */ + +EXEC core.executeJavaUpgradeCode 'encryptMappedDrivePassword'; \ No newline at end of file diff --git a/core/resources/schemas/dbscripts/sqlserver/core-18.10-18.20.sql b/core/resources/schemas/dbscripts/sqlserver/core-18.10-18.20.sql deleted file mode 100644 index 53cf79f84c1..00000000000 --- a/core/resources/schemas/dbscripts/sqlserver/core-18.10-18.20.sql +++ /dev/null @@ -1,19 +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. - */ - -/* core-18.10-18.11.sql */ - -EXEC core.executeJavaUpgradeCode 'encryptMappedDrivePassword'; \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.10.sql b/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.20.sql similarity index 97% rename from experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.10.sql rename to experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.20.sql index c831ba67e52..52dd7f98ab9 100644 --- a/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.10.sql +++ b/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.20.sql @@ -1206,4 +1206,42 @@ CREATE TABLE exp.Edge CONSTRAINT FK_Edge_ToLsid_Object FOREIGN KEY (ToLsid) REFERENCES exp.object (objecturi), CONSTRAINT FK_Edge_RunId_Run FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId), CONSTRAINT UQ_Edge_FromLsid_ToLsid_RunId UNIQUE (FromLsid, ToLsid, RunId) -); \ No newline at end of file +); + +/* exp-18.10-18.20.sql */ + +EXEC core.executeJavaUpgradeCode 'rebuildAllEdges'; + +ALTER TABLE exp.PropertyDescriptor + ADD TextExpression nvarchar(200) NULL + +CREATE TABLE exp.Exclusions +( + RowId INT IDENTITY (1, 1) NOT NULL, + RunId INT NOT NULL, + Comment TEXT NULL, + Created DATETIME NULL, + CreatedBy INT NULL, + Modified DATETIME NULL, + ModifiedBy INT NULL, + CONSTRAINT PK_Exclusion_RowId PRIMARY KEY (RowId), + CONSTRAINT FK_Exclusion_RunId FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId) +); +CREATE INDEX IX_Exclusion_RunId ON exp.Exclusions(RunId); + +CREATE TABLE exp.ExclusionMaps +( + RowId INT IDENTITY (1, 1) NOT NULL, + ExclusionId INT NOT NULL, + DataRowId INT NOT NULL, + Created DATETIME NULL, + CreatedBy INT NULL, + Modified DATETIME NULL, + ModifiedBy INT NULL, + CONSTRAINT PK_ExclusionMap_RowId PRIMARY KEY (RowId), + CONSTRAINT FK_ExclusionMap_ExclusionId FOREIGN KEY (ExclusionId) REFERENCES exp.Exclusions (RowId), + CONSTRAINT UQ_ExclusionMap_ExclusionId_DataId UNIQUE (ExclusionId, DataRowId) +); + +ALTER TABLE exp.DomainDescriptor ALTER COLUMN DomainURI NVARCHAR(300) NOT NULL; +ALTER TABLE exp.PropertyDescriptor ALTER COLUMN PropertyURI NVARCHAR(300) NOT NULL; \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/sqlserver/exp-18.10-18.20.sql b/experiment/resources/schemas/dbscripts/sqlserver/exp-18.10-18.20.sql deleted file mode 100644 index a3bad1788c0..00000000000 --- a/experiment/resources/schemas/dbscripts/sqlserver/exp-18.10-18.20.sql +++ /dev/null @@ -1,58 +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. - */ -/* exp-18.10-18.11.sql */ - -EXEC core.executeJavaUpgradeCode 'rebuildAllEdges'; - -/* exp-18.11-18.12.sql */ - -ALTER TABLE exp.PropertyDescriptor - ADD TextExpression nvarchar(200) NULL - -/* exp-18.12-18.13.sql */ - -CREATE TABLE exp.Exclusions -( - RowId INT IDENTITY (1, 1) NOT NULL, - RunId INT NOT NULL, - Comment TEXT NULL, - Created DATETIME NULL, - CreatedBy INT NULL, - Modified DATETIME NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_Exclusion_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_Exclusion_RunId FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId) -); -CREATE INDEX IX_Exclusion_RunId ON exp.Exclusions(RunId); - -CREATE TABLE exp.ExclusionMaps -( - RowId INT IDENTITY (1, 1) NOT NULL, - ExclusionId INT NOT NULL, - DataRowId INT NOT NULL, - Created DATETIME NULL, - CreatedBy INT NULL, - Modified DATETIME NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_ExclusionMap_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_ExclusionMap_ExclusionId FOREIGN KEY (ExclusionId) REFERENCES exp.Exclusions (RowId), - CONSTRAINT UQ_ExclusionMap_ExclusionId_DataId UNIQUE (ExclusionId, DataRowId) -); - -/* exp-18.13-18.14.sql */ - -ALTER TABLE exp.DomainDescriptor ALTER COLUMN DomainURI NVARCHAR(300) NOT NULL; -ALTER TABLE exp.PropertyDescriptor ALTER COLUMN PropertyURI NVARCHAR(300) NOT NULL; \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/sqlserver/exp-18.11-18.20.sql b/experiment/resources/schemas/dbscripts/sqlserver/exp-18.11-18.20.sql deleted file mode 100644 index 9aacbd8034b..00000000000 --- a/experiment/resources/schemas/dbscripts/sqlserver/exp-18.11-18.20.sql +++ /dev/null @@ -1,54 +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. - */ -/* exp-18.11-18.12.sql */ - -ALTER TABLE exp.PropertyDescriptor - ADD TextExpression nvarchar(200) NULL - -/* exp-18.12-18.13.sql */ - -CREATE TABLE exp.Exclusions -( - RowId INT IDENTITY (1, 1) NOT NULL, - RunId INT NOT NULL, - Comment TEXT NULL, - Created DATETIME NULL, - CreatedBy INT NULL, - Modified DATETIME NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_Exclusion_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_Exclusion_RunId FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId) -); -CREATE INDEX IX_Exclusion_RunId ON exp.Exclusions(RunId); - -CREATE TABLE exp.ExclusionMaps -( - RowId INT IDENTITY (1, 1) NOT NULL, - ExclusionId INT NOT NULL, - DataRowId INT NOT NULL, - Created DATETIME NULL, - CreatedBy INT NULL, - Modified DATETIME NULL, - ModifiedBy INT NULL, - CONSTRAINT PK_ExclusionMap_RowId PRIMARY KEY (RowId), - CONSTRAINT FK_ExclusionMap_ExclusionId FOREIGN KEY (ExclusionId) REFERENCES exp.Exclusions (RowId), - CONSTRAINT UQ_ExclusionMap_ExclusionId_DataId UNIQUE (ExclusionId, DataRowId) -); - -/* exp-18.13-18.14.sql */ - -ALTER TABLE exp.DomainDescriptor ALTER COLUMN DomainURI NVARCHAR(300) NOT NULL; -ALTER TABLE exp.PropertyDescriptor ALTER COLUMN PropertyURI NVARCHAR(300) NOT NULL; \ No newline at end of file diff --git a/experiment/resources/schemas/dbscripts/sqlserver/required_scripts.txt b/experiment/resources/schemas/dbscripts/sqlserver/required_scripts.txt deleted file mode 100644 index 2530d008524..00000000000 --- a/experiment/resources/schemas/dbscripts/sqlserver/required_scripts.txt +++ /dev/null @@ -1 +0,0 @@ -exp-18.11-18.20.sql diff --git a/pipeline/resources/schemas/dbscripts/sqlserver/pipeline-0.00-18.10.sql b/pipeline/resources/schemas/dbscripts/sqlserver/pipeline-0.00-18.20.sql similarity index 86% rename from pipeline/resources/schemas/dbscripts/sqlserver/pipeline-0.00-18.10.sql rename to pipeline/resources/schemas/dbscripts/sqlserver/pipeline-0.00-18.20.sql index 0ee807dcb84..2148b49d049 100644 --- a/pipeline/resources/schemas/dbscripts/sqlserver/pipeline-0.00-18.10.sql +++ b/pipeline/resources/schemas/dbscripts/sqlserver/pipeline-0.00-18.20.sql @@ -128,4 +128,20 @@ CREATE TABLE pipeline.TriggerConfigurations /* pipeline-17.30-18.10.sql */ -ALTER TABLE pipeline.TriggerConfigurations ADD customConfiguration NVARCHAR(MAX); \ No newline at end of file +ALTER TABLE pipeline.TriggerConfigurations ADD customConfiguration NVARCHAR(MAX); + +/* pipeline-18.10-18.20.sql */ + +CREATE TABLE pipeline.TriggeredFiles +( + RowId INT IDENTITY(1,1) NOT NULL, + Container ENTITYID NOT NULL, + TriggerId INT NOT NULL, + FilePath NVARCHAR(1000) NOT NULL, + LastRun DATETIME, + + CONSTRAINT PK_TriggeredFiles PRIMARY KEY (RowId), + CONSTRAINT FK_TriggeredFiles_TriggerId FOREIGN KEY (TriggerId) REFERENCES pipeline.TriggerConfigurations(RowId), + CONSTRAINT FK_TriggeredFiles_Container FOREIGN KEY (Container) REFERENCES core.Containers (ENTITYID), + CONSTRAINT UQ_TriggeredFiles_Container_TriggerId_FilePath UNIQUE (Container, TriggerId, FilePath) +); \ No newline at end of file diff --git a/pipeline/resources/schemas/dbscripts/sqlserver/pipeline-18.10-18.20.sql b/pipeline/resources/schemas/dbscripts/sqlserver/pipeline-18.10-18.20.sql deleted file mode 100644 index 98e63f4e445..00000000000 --- a/pipeline/resources/schemas/dbscripts/sqlserver/pipeline-18.10-18.20.sql +++ /dev/null @@ -1,31 +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. - */ - -/* pipeline-18.10-18.11.sql */ - -CREATE TABLE pipeline.TriggeredFiles -( - RowId INT IDENTITY(1,1) NOT NULL, - Container ENTITYID NOT NULL, - TriggerId INT NOT NULL, - FilePath NVARCHAR(1000) NOT NULL, - LastRun DATETIME, - - CONSTRAINT PK_TriggeredFiles PRIMARY KEY (RowId), - CONSTRAINT FK_TriggeredFiles_TriggerId FOREIGN KEY (TriggerId) REFERENCES pipeline.TriggerConfigurations(RowId), - CONSTRAINT FK_TriggeredFiles_Container FOREIGN KEY (Container) REFERENCES core.Containers (ENTITYID), - CONSTRAINT UQ_TriggeredFiles_Container_TriggerId_FilePath UNIQUE (Container, TriggerId, FilePath) -); \ No newline at end of file diff --git a/study/resources/schemas/dbscripts/sqlserver/study-0.00-18.10.sql b/study/resources/schemas/dbscripts/sqlserver/study-0.00-18.20.sql similarity index 99% rename from study/resources/schemas/dbscripts/sqlserver/study-0.00-18.10.sql rename to study/resources/schemas/dbscripts/sqlserver/study-0.00-18.20.sql index bc72141331d..2751d62483e 100644 --- a/study/resources/schemas/dbscripts/sqlserver/study-0.00-18.10.sql +++ b/study/resources/schemas/dbscripts/sqlserver/study-0.00-18.20.sql @@ -1587,3 +1587,7 @@ CREATE INDEX ix_participantvisit_sequencenum ON study.participantvisit (containe -- Adding as an explicit index because it got lost on postgresql as an include column CREATE INDEX ix_participantvisit_visitrowid ON study.participantvisit (visitrowid); + +/* study-18.10-18.20.sql */ + +ALTER TABLE study.Dataset ALTER COLUMN TypeURI NVARCHAR(300); \ No newline at end of file diff --git a/study/resources/schemas/dbscripts/sqlserver/study-18.10-18.20.sql b/study/resources/schemas/dbscripts/sqlserver/study-18.10-18.20.sql deleted file mode 100644 index bc67e4d9dc4..00000000000 --- a/study/resources/schemas/dbscripts/sqlserver/study-18.10-18.20.sql +++ /dev/null @@ -1,18 +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. - */ -/* study-18.10-18.11.sql */ - -ALTER TABLE study.Dataset ALTER COLUMN TypeURI NVARCHAR(300); \ No newline at end of file From 274c17a51d7300f5d204d413c66545975e053fe0 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Sun, 2 Aug 2020 16:45:34 -0700 Subject: [PATCH 3/4] Update .gitattributes --- .gitattributes | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.gitattributes b/.gitattributes index 652963efb45..5b5504db8fb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,10 +2,8 @@ announcements/module.properties -text announcements/resources/schemas/comm.xml -text -announcements/resources/schemas/dbscripts/postgresql/comm-18.10-18.20.sql -text announcements/resources/schemas/dbscripts/postgresql/comm-create.sql -text announcements/resources/schemas/dbscripts/postgresql/comm-drop.sql -text -announcements/resources/schemas/dbscripts/sqlserver/comm-18.10-18.20.sql -text announcements/resources/schemas/dbscripts/sqlserver/comm-drop.sql -text announcements/src/org/labkey/announcements/announcementListLinkBar.jsp -text announcements/src/org/labkey/announcements/AnnouncementModule.java -text @@ -1493,7 +1491,6 @@ api/src/org/labkey/api/util/StringUtilsLabKey.java -text api/src/org/labkey/api/util/SubstitutionFormat.java -text api/src/org/labkey/api/util/SystemMaintenance.java -text api/src/org/labkey/api/util/SystemMaintenanceJob.java -text -api/src/org/labkey/api/util/Taintable.java -text api/src/org/labkey/api/util/ThumbnailUtil.java -text api/src/org/labkey/api/util/TimeOnlyDate.java -text api/src/org/labkey/api/util/UnexpectedException.java -text @@ -2154,13 +2151,9 @@ devtools/src/org/labkey/devtools/view/tags.jsp -text experiment/module.properties -text experiment/resources/queries/exp/RunGroups/NameOnly.qview.xml -text experiment/resources/queries/exp/SampleSets/NameOnly.qview.xml -text -experiment/resources/schemas/dbscripts/postgresql/exp-18.10-18.20.sql -text -experiment/resources/schemas/dbscripts/postgresql/exp-18.11-18.20.sql -text experiment/resources/schemas/dbscripts/postgresql/exp-18.20-18.30.sql -text experiment/resources/schemas/dbscripts/postgresql/exp-create.sql -text experiment/resources/schemas/dbscripts/postgresql/exp-drop.sql -text -experiment/resources/schemas/dbscripts/sqlserver/exp-18.10-18.20.sql -text -experiment/resources/schemas/dbscripts/sqlserver/exp-18.11-18.20.sql -text experiment/resources/schemas/dbscripts/sqlserver/exp-18.20-18.30.sql -text experiment/resources/schemas/dbscripts/sqlserver/exp-drop.sql -text experiment/resources/schemas/exp.xml -text @@ -2894,12 +2887,10 @@ pipeline/src/org/labkey/pipeline/setup.jsp -text pipeline/src/org/labkey/pipeline/startPipelineImport.jsp -text pipeline/src/org/labkey/pipeline/status/DescriptionDisplayColumn.java -text pipeline/src/org/labkey/pipeline/status/enterprisePipelineAdmin.jsp -text -pipeline/src/org/labkey/pipeline/status/escalateJobFailure.jsp -text pipeline/src/org/labkey/pipeline/status/FileDisplayColumn.java -text pipeline/src/org/labkey/pipeline/status/JobDisplayColumn.java -text pipeline/src/org/labkey/pipeline/status/JobStatusLogView.java -text pipeline/src/org/labkey/pipeline/status/PipelineQueryView.java -text -pipeline/src/org/labkey/pipeline/status/ProviderButtonBar.java -text pipeline/src/org/labkey/pipeline/status/StatusController.java -text pipeline/src/org/labkey/pipeline/status/StatusDataRegion.java -text pipeline/src/org/labkey/pipeline/trigger/PipelineTriggerManager.java -text From 9872863e121cd72b7ebdce0f1b82eeb96d27b635 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Sun, 2 Aug 2020 18:54:05 -0700 Subject: [PATCH 4/4] Remove no-longer-invoked upgrade code --- .../dbscripts/postgresql/core-0.00-18.20.sql | 4 -- .../dbscripts/sqlserver/core-0.00-18.20.sql | 4 -- core/src/org/labkey/core/CoreUpgradeCode.java | 70 ------------------- .../dbscripts/postgresql/exp-0.00-18.20.sql | 2 - .../dbscripts/sqlserver/exp-0.00-18.20.sql | 2 - 5 files changed, 82 deletions(-) diff --git a/core/resources/schemas/dbscripts/postgresql/core-0.00-18.20.sql b/core/resources/schemas/dbscripts/postgresql/core-0.00-18.20.sql index 202d8615ec5..8b60756b798 100644 --- a/core/resources/schemas/dbscripts/postgresql/core-0.00-18.20.sql +++ b/core/resources/schemas/dbscripts/postgresql/core-0.00-18.20.sql @@ -614,7 +614,3 @@ ALTER TABLE core.APIKeys DROP CONSTRAINT PK_APIKeys, ADD CONSTRAINT PK_APIKeys PRIMARY KEY (RowId), ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt); - -/* core-18.10-18.20.sql */ - -SELECT core.executeJavaUpgradeCode('encryptMappedDrivePassword'); \ No newline at end of file diff --git a/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.20.sql b/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.20.sql index e60653c8ac5..400930e1c12 100644 --- a/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.20.sql +++ b/core/resources/schemas/dbscripts/sqlserver/core-0.00-18.20.sql @@ -819,7 +819,3 @@ ALTER TABLE core.APIKeys ADD RowId INT IDENTITY(1, 1); ALTER TABLE core.APIKeys DROP CONSTRAINT PK_APIKeys; ALTER TABLE core.APIKeys ADD CONSTRAINT PK_APIKeys PRIMARY KEY (RowId); ALTER TABLE core.APIKeys ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt); - -/* core-18.10-18.20.sql */ - -EXEC core.executeJavaUpgradeCode 'encryptMappedDrivePassword'; \ No newline at end of file diff --git a/core/src/org/labkey/core/CoreUpgradeCode.java b/core/src/org/labkey/core/CoreUpgradeCode.java index 1285616475f..34f89ff175c 100644 --- a/core/src/org/labkey/core/CoreUpgradeCode.java +++ b/core/src/org/labkey/core/CoreUpgradeCode.java @@ -15,8 +15,6 @@ */ package org.labkey.core; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.SystemUtils; import org.apache.log4j.Logger; import org.labkey.api.data.Container; import org.labkey.api.data.ContainerManager; @@ -45,8 +43,6 @@ import org.labkey.api.security.UserManager; import org.labkey.api.security.roles.PlatformDeveloperRole; import org.labkey.api.services.ServiceRegistry; -import org.labkey.api.settings.NetworkDriveProps; -import org.labkey.api.settings.WriteableAppProps; import org.labkey.api.util.ExceptionUtil; import org.labkey.api.util.PageFlowUtil; import org.labkey.core.reports.ExternalScriptEngineDefinitionImpl; @@ -89,72 +85,6 @@ public void handleUnknownModules(ModuleContext context) ModuleLoader.getInstance().handleUnkownModules(); } - /** - * Invoked from 18.10-18.11 to migrate mapped drive settings to an encrypted property store. - */ - @SuppressWarnings({"UnusedDeclaration"}) - public void encryptMappedDrivePassword(final ModuleContext context) - { - if (!context.isNewInstall() && SystemUtils.IS_OS_WINDOWS) - { - WritableNetworkProps props = new WritableNetworkProps(); - - String driveLetter = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_LETTER); - String drivePath = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_PATH); - String user = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_USER); - String password = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_PASSWORD); - - if (StringUtils.isNotBlank(driveLetter) || StringUtils.isNotBlank(drivePath) || StringUtils.isNotBlank(user) || StringUtils.isNotBlank(password)) - { - // we won't blow up on upgrade if the encryption key isn't specified but we will drop any - // existing mapped drive settings and force them to re-add them - if (Encryption.isMasterEncryptionPassPhraseSpecified()) - { - NetworkDriveProps.setNetworkDriveLetter(driveLetter); - NetworkDriveProps.setNetworkDrivePath(drivePath); - NetworkDriveProps.setNetworkDriveUser(user); - NetworkDriveProps.setNetworkDrivePassword(password); - } - else - { - LOG.warn("Master encryption key not specified, unable to migrate saved network drive settings"); - } - // clear out the legacy settings - props.clearNetworkSettings(); - props.save(context.getUpgradeUser()); - } - } - } - - /** - * Helper class to access legacy network settings so we can remove the old API methods immediately - */ - private static class WritableNetworkProps extends WriteableAppProps - { - static final String NETWORK_DRIVE_LETTER = "networkDriveLetter"; - static final String NETWORK_DRIVE_PATH = "networkDrivePath"; - static final String NETWORK_DRIVE_USER = "networkDriveUser"; - static final String NETWORK_DRIVE_PASSWORD = "networkDrivePassword"; - - public WritableNetworkProps() - { - super(ContainerManager.getRoot()); - } - - public void clearNetworkSettings() - { - remove(NETWORK_DRIVE_LETTER); - remove(NETWORK_DRIVE_PATH); - remove(NETWORK_DRIVE_USER); - remove(NETWORK_DRIVE_PASSWORD); - } - - public String getStringValue(String key) - { - return lookupStringValue(key, ""); - } - } - /** * Invoked from 18.21-18.22 */ diff --git a/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.20.sql b/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.20.sql index 8829ad3e739..f636c441649 100644 --- a/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.20.sql +++ b/experiment/resources/schemas/dbscripts/postgresql/exp-0.00-18.20.sql @@ -1214,8 +1214,6 @@ CREATE TABLE exp.Edge /* exp-18.10-18.20.sql */ -SELECT core.executeJavaUpgradeCode('rebuildAllEdges'); - ALTER TABLE exp.propertydescriptor ADD TextExpression varchar(200) NULL; diff --git a/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.20.sql b/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.20.sql index 52dd7f98ab9..fb0494b17b0 100644 --- a/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.20.sql +++ b/experiment/resources/schemas/dbscripts/sqlserver/exp-0.00-18.20.sql @@ -1210,8 +1210,6 @@ CREATE TABLE exp.Edge /* exp-18.10-18.20.sql */ -EXEC core.executeJavaUpgradeCode 'rebuildAllEdges'; - ALTER TABLE exp.PropertyDescriptor ADD TextExpression nvarchar(200) NULL