-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #820 from folio-org/release_6.1.8
Release 6.1.8
- Loading branch information
Showing
5 changed files
with
176 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
service/grails-app/migrations/correct-gin-indices-pre-poppy.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
databaseChangeLog = { | ||
/* GIN Indexes have been added in update-mod-agreements-6-0.groovy | ||
* These can cause issues when the underlying data passes a certain limit | ||
* due to trigram operator not being used and the postgres token size growing | ||
* | ||
* It is a little unorthodox, however these index creations are conditional on | ||
* "CREATE IF NOT EXISTS". We will make use of that to insert indices on those | ||
* fields _before_ they are set up by upgrading/new implementors. For any tenants | ||
* who already managed to upgrade, these new changesets will be ignored, but it | ||
* it _recommended_ that an operational task be undertaken to bring those schemas | ||
* in line with the indices in place on new instances of mod-agreements | ||
*/ | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-poppy-1") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'alternate_resource_name', columnNames: 'arn_name') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX arn_name_idx ON ${database.defaultSchemaName}.alternate_resource_name USING gin (arn_name gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-poppy-2") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'erm_resource', columnNames: 'res_description') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX erm_resource_res_description_idx ON ${database.defaultSchemaName}.erm_resource USING gin (res_description gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-poppy-3") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'identifier', columnNames: 'id_value') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX identifier_id_value_idx ON ${database.defaultSchemaName}.identifier USING gin (id_value gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-poppy-4") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'identifier_namespace', columnNames: 'idns_value') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX identifier_namespace_value_idx ON ${database.defaultSchemaName}.identifier_namespace USING gin (idns_value gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-poppy-5") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'refdata_category', columnNames: 'rdc_description') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX refdata_category_rdc_description_idx ON ${database.defaultSchemaName}.refdata_category USING gin (rdc_description gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
service/grails-app/migrations/correct-gin-indices-pre-quesnalia.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
databaseChangeLog = { | ||
/* | ||
* See comment in correct-gin-indices-pre-poppy.groovy. Same applies here to | ||
* pre-empt GIN indices set up in quesnalia upgrade file(s) | ||
*/ | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-quesnalia-1") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'entitlement', columnNames: 'ent_description') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX entitlement_description_idx ON ${database.defaultSchemaName}.entitlement USING gin (ent_description gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-quesnalia-2") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'entitlement', columnNames: 'ent_note') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX entitlement_note_idx ON ${database.defaultSchemaName}.entitlement USING gin (ent_note gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-quesnalia-3") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'entitlement', columnNames: 'ent_reference') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX entitlement_reference_idx ON ${database.defaultSchemaName}.entitlement USING gin (ent_reference gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-quesnalia-4") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'platform', columnNames: 'pt_name') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX platform_name_idx ON ${database.defaultSchemaName}.platform USING gin (pt_name gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
|
||
changeSet(author: "EFreestone (manual)", id: "2024-09-06-ERM-3321-quesnalia-5") { | ||
preConditions (onFail: 'MARK_RAN', onError: 'WARN') { | ||
not { | ||
indexExists(tableName: 'subscription_agreement', columnNames: 'sa_description') | ||
} | ||
} | ||
// Gin indexes need to be done via scripting. | ||
grailsChange { | ||
change { | ||
def cmd = "CREATE INDEX subscription_agreement_description_idx ON ${database.defaultSchemaName}.subscription_agreement USING gin (sa_description gin_trgm_ops);".toString() | ||
sql.execute(cmd); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters