diff --git a/pass-core-main/src/main/resources/application.yaml b/pass-core-main/src/main/resources/application.yaml index 71056153..42d44eca 100644 --- a/pass-core-main/src/main/resources/application.yaml +++ b/pass-core-main/src/main/resources/application.yaml @@ -56,7 +56,7 @@ spring: password: '' driver-class-name: 'org.h2.Driver' liquibase: - change-log: 'classpath:db/changelog/changelog.yaml' + change-log: 'classpath:db/changelog/core-changelog.yaml' parameters: institution-changelog-file: ${PASS_CORE_INSTN_CHG_LOG:file:////tmp/instn-changelog.yaml} activemq: diff --git a/pass-core-main/src/main/resources/db/changelog/changelog.yaml b/pass-core-main/src/main/resources/db/changelog/changelog.yaml index 2879716b..da76eec9 100644 --- a/pass-core-main/src/main/resources/db/changelog/changelog.yaml +++ b/pass-core-main/src/main/resources/db/changelog/changelog.yaml @@ -1,7 +1,117 @@ +# This is changelog for public release databaseChangeLog: - - include: - file: db/changelog/public-changelog.yaml - - include: - file: ${institution-changelog-file} - errorIfMissing: false + - changeSet: + id: 1 + author: russ-poetker + preConditions: + - onFail: MARK_RAN + - not: + - tableExists: + tableName: pass_submission + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/schema/initial-schema.sql + splitStatements: true + stripComments: true + - changeSet: + id: 2 + author: mark-patton + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/schema/rc-external-ids.sql + splitStatements: true + stripComments: true + - changeSet: + id: 3 + author: russ-poetker + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/data/rc-ext-ids-migration.sql + splitStatements: true + stripComments: true + - dropColumn: + tableName: pass_repository_copy + columns: + - column: + name: externalids + - changeSet: + id: 4 + author: mark-patton + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/schema/indices.sql + splitStatements: true + stripComments: true + - changeSet: + id: 5 + author: mark-patton + dbms: postgresql + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/schema/postgres-pattern-indices.sql + splitStatements: true + stripComments: true + - changeSet: + id: 6 + author: mark-patton + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/schema/long-text.sql + splitStatements: true + stripComments: true + - changeSet: + id: 7 + author: mark-patton + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/schema/index-localkey.sql + splitStatements: true + stripComments: true + - changeSet: + id: 8 + author: mark-patton + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/schema/remove-contrib-pub.sql + splitStatements: true + stripComments: true + - changeSet: + id: 9 + author: russ-poetker + changes: + - addColumn: + tableName: pass_submission + columns: + - column: + name: version + type: bigint + - addColumn: + tableName: pass_deposit + columns: + - column: + name: version + type: bigint + - sqlFile: + encoding: utf-8 + path: /db/changelog/data/version-migration.sql + splitStatements: true + stripComments: true + - changeSet: + id: 10 + author: russ-poetker + dbms: postgresql + changes: + - sqlFile: + encoding: utf-8 + path: /db/changelog/data/deposit-repo-copy-publication-id-fix.sql + splitStatements: true + stripComments: true diff --git a/pass-core-main/src/main/resources/db/changelog/core-changelog.yaml b/pass-core-main/src/main/resources/db/changelog/core-changelog.yaml new file mode 100644 index 00000000..5be4a6ec --- /dev/null +++ b/pass-core-main/src/main/resources/db/changelog/core-changelog.yaml @@ -0,0 +1,7 @@ +databaseChangeLog: + - include: + file: db/changelog/changelog.yaml + - include: + file: ${institution-changelog-file} + errorIfMissing: false + diff --git a/pass-core-main/src/main/resources/db/changelog/public-changelog.yaml b/pass-core-main/src/main/resources/db/changelog/public-changelog.yaml deleted file mode 100644 index 75855f00..00000000 --- a/pass-core-main/src/main/resources/db/changelog/public-changelog.yaml +++ /dev/null @@ -1,116 +0,0 @@ -databaseChangeLog: - - changeSet: - id: 1 - author: russ-poetker - preConditions: - - onFail: MARK_RAN - - not: - - tableExists: - tableName: pass_submission - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/schema/initial-schema.sql - splitStatements: true - stripComments: true - - changeSet: - id: 2 - author: mark-patton - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/schema/rc-external-ids.sql - splitStatements: true - stripComments: true - - changeSet: - id: 3 - author: russ-poetker - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/data/rc-ext-ids-migration.sql - splitStatements: true - stripComments: true - - dropColumn: - tableName: pass_repository_copy - columns: - - column: - name: externalids - - changeSet: - id: 4 - author: mark-patton - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/schema/indices.sql - splitStatements: true - stripComments: true - - changeSet: - id: 5 - author: mark-patton - dbms: postgresql - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/schema/postgres-pattern-indices.sql - splitStatements: true - stripComments: true - - changeSet: - id: 6 - author: mark-patton - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/schema/long-text.sql - splitStatements: true - stripComments: true - - changeSet: - id: 7 - author: mark-patton - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/schema/index-localkey.sql - splitStatements: true - stripComments: true - - changeSet: - id: 8 - author: mark-patton - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/schema/remove-contrib-pub.sql - splitStatements: true - stripComments: true - - changeSet: - id: 9 - author: russ-poetker - changes: - - addColumn: - tableName: pass_submission - columns: - - column: - name: version - type: bigint - - addColumn: - tableName: pass_deposit - columns: - - column: - name: version - type: bigint - - sqlFile: - encoding: utf-8 - path: /db/changelog/data/version-migration.sql - splitStatements: true - stripComments: true - - changeSet: - id: 10 - author: russ-poetker - dbms: postgresql - changes: - - sqlFile: - encoding: utf-8 - path: /db/changelog/data/deposit-repo-copy-publication-id-fix.sql - splitStatements: true - stripComments: true -