Skip to content

Commit 2027e02

Browse files
authored
Consolidate SQL scripts to *-0.000-25.000.sql (#975)
1 parent b5a7ea0 commit 2027e02

5 files changed

Lines changed: 14 additions & 41 deletions

File tree

protein/resources/schemas/dbscripts/postgresql/prot-0.000-21.000.sql renamed to protein/resources/schemas/dbscripts/postgresql/prot-0.000-25.000.sql

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
-- @SkipScriptIfSchemaExists This script moved from the MS2 module to the Protein module in 2024. If the schema exists,
18-
-- we want this script to be recorded as "run", but don't want any of the statements executed.
19-
-- Note: This script was not consolidated in Jan, 2025 because we want prot-23.000-23.001.sql to execute on existing servers.
20-
-- TODO: Remove the above annotation in Jan, 2026 during script consolidation
21-
2217
CREATE SCHEMA prot;
2318

2419
/****** AnnotInsertions */
@@ -625,3 +620,17 @@ CREATE TABLE prot.CustomAnnotation
625620
);
626621

627622
CREATE INDEX IX_CustomAnnotation_CustomAnnotationSetId ON prot.CustomAnnotation(CustomAnnotationSetId);
623+
624+
/* 23.xxx SQL scripts */
625+
626+
-- These PostgreSQL-only special indexes use 'varchar_pattern_ops' operator, which are used when queries have pattern expressions
627+
-- using LIKE, however, they only work when using prefixes.
628+
-- PostgreSQL doc :https://www.postgresql.org/docs/current/indexes-opclass.html
629+
630+
CREATE INDEX IF NOT EXISTS IX_ProtSequences_Identifier_VarcharPatternOps ON prot.Identifiers (lower(Identifier) varchar_pattern_ops);
631+
632+
CREATE INDEX IF NOT EXISTS IX_ProtAnnotations_AnnotVal_VarcharPatternOps ON prot.Annotations (lower(AnnotVal) varchar_pattern_ops);
633+
634+
CREATE INDEX IF NOT EXISTS IX_ProtFastaSequences_LookupString_VarcharPatternOps ON prot.FastaSequences (lower(LookupString) varchar_pattern_ops);
635+
636+
CREATE INDEX IF NOT EXISTS IX_ProtIdentifiers_BestName_VarcharPatternOps ON prot.Sequences (lower(BestName) varchar_pattern_ops);

protein/resources/schemas/dbscripts/postgresql/prot-23.000-23.001.sql

Lines changed: 0 additions & 27 deletions
This file was deleted.

protein/resources/schemas/dbscripts/postgresql/prot-24.001-24.002.sql

Lines changed: 0 additions & 2 deletions
This file was deleted.

protein/resources/schemas/dbscripts/sqlserver/prot-0.000-21.000.sql renamed to protein/resources/schemas/dbscripts/sqlserver/prot-0.000-25.000.sql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
-- @SkipScriptIfSchemaExists This script moved from the MS2 module to the Protein module in 2024. If the schema exists,
18-
-- we want this script to be recorded as "run", but don't want any of the statements executed.
19-
-- TODO: Remove the above annotation in Jan, 2026 during script consolidation
20-
2117
CREATE SCHEMA prot;
2218
GO
2319

protein/resources/schemas/dbscripts/sqlserver/prot-24.001-24.002.sql

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)