All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.template-changeLog.yml Maven / Gradle / Ivy

The newest version!
databaseChangeLog:

- changeSet:
    id:                        1585750166969-1
    author:                    mborodenko
    comment:
    changes:
    - sql:
        comment:               Migrate repository_image data to repository_file
        sql:                   >-
          insert into repository_file
            (id, version, accessRights, bibliographicCitation, contentType, created, createdDate, creator,
            dateRetrieved, description, extension, extent, lastModifiedDate, license, md5Sum, originalFilename,
            originalUrl, path, rightsHolder, sha1Sum, subject, title, uuid, active, createdBy, lastModifiedBy,
            size, folder_id)
          select
            id, version, accessRights, bibliographicCitation, contentType, created, createdDate, creator,
            dateRetrieved, description, extension, extent, lastModifiedDate, license, md5Sum, originalFilename,
            originalUrl, path, rightsHolder, sha1Sum, subject, title, uuid, active, createdBy, lastModifiedBy,
            size, folder_id
          from repository_image;
    - sql:
        comment:               Migrate repository_document data to repository_file
        sql:                   >-
          insert into repository_file
            (id, version, accessRights, bibliographicCitation, contentType, created, createdDate, creator,
            dateRetrieved, description, extension, extent, lastModifiedDate, license, md5Sum, originalFilename,
            originalUrl, path, rightsHolder, sha1Sum, subject, title, uuid, active, createdBy, lastModifiedBy,
            size,folder_id)
          select
            id, version, accessRights, bibliographicCitation, contentType, created, createdDate, creator,
            dateRetrieved, description, extension, extent, lastModifiedDate, license, md5Sum, originalFilename,
            originalUrl, path, rightsHolder, sha1Sum, subject, title, uuid, active, createdBy, lastModifiedBy,
            size,folder_id
          from repository_document;

# Drop unnecessary columns
- changeSet:
       id:                          1585750166969-2
       author:                      mborodenko
       comment:                     Drop unnecessary columns from the repository_image
       changes:
         - dropForeignKeyConstraint:
             baseTableName:         repository_image
             constraintName:        FK_2ma70p16s23l9b4gvqp51qw7f
         - dropUniqueConstraint:
             tableName:             repository_image
             constraintName:        UK_dynu7yuj2xn19qlp387inexuh
         - dropColumn:
             tableName:             repository_image
             columnName:            version
         - dropColumn:
             tableName:             repository_image
             columnName:            accessRights
         - dropColumn:
             tableName:             repository_image
             columnName:            bibliographicCitation
         - dropColumn:
             tableName:             repository_image
             columnName:            contentType
         - dropColumn:
             tableName:             repository_image
             columnName:            created
         - dropColumn:
             tableName:             repository_image
             columnName:            createdDate
         - dropColumn:
            tableName:              repository_image
            columnName:             creator
         - dropColumn:
             tableName:             repository_image
             columnName:            dateRetrieved
         - dropColumn:
             tableName:             repository_image
             columnName:            description
         - dropColumn:
             tableName:             repository_image
             columnName:            extension
         - dropColumn:
             tableName:             repository_image
             columnName:            extent
         - dropColumn:
             tableName:             repository_image
             columnName:            lastModifiedDate
         - dropColumn:
             tableName:             repository_image
             columnName:            license
         - dropColumn:
             tableName:             repository_image
             columnName:            md5Sum
         - dropColumn:
             tableName:             repository_image
             columnName:            originalFilename
         - dropColumn:
             tableName:             repository_image
             columnName:            originalUrl
         - dropColumn:
             tableName:             repository_image
             columnName:            path
         - dropColumn:
             tableName:             repository_image
             columnName:            rightsHolder
         - dropColumn:
             tableName:             repository_image
             columnName:            sha1Sum
         - dropColumn:
             tableName:             repository_image
             columnName:            subject
         - dropColumn:
             tableName:             repository_image
             columnName:            title
         - dropColumn:
             tableName:             repository_image
             columnName:            uuid
         - dropColumn:
             tableName:             repository_image
             columnName:            active
         - dropColumn:
             tableName:             repository_image
             columnName:            createdBy
         - dropColumn:
             tableName:             repository_image
             columnName:            lastModifiedBy
         - dropColumn:
             tableName:             repository_image
             columnName:            size
         - dropColumn:
             tableName:             repository_image
             columnName:            folder_id

- changeSet:
       id:                          1585750166969-3
       author:                      mborodenko
       comment:                     Drop unnecessary columns from the repository_document
       changes:
         - dropForeignKeyConstraint:
             baseTableName:         repository_document
             constraintName:        FK_trk7cw1r3dsxgu8jlia1ecrgj
         - dropUniqueConstraint:
             tableName:             repository_document
             constraintName:        UK_1bckkd8l1n6n2hsl1895utixh
         - dropColumn:
             tableName:             repository_document
             columnName:            version
         - dropColumn:
             tableName:             repository_document
             columnName:            accessRights
         - dropColumn:
             tableName:             repository_document
             columnName:            bibliographicCitation
         - dropColumn:
             tableName:             repository_document
             columnName:            contentType
         - dropColumn:
             tableName:             repository_document
             columnName:            created
         - dropColumn:
             tableName:             repository_document
             columnName:            createdDate
         - dropColumn:
             tableName:             repository_document
             columnName:            creator
         - dropColumn:
             tableName:             repository_document
             columnName:            dateRetrieved
         - dropColumn:
             tableName:             repository_document
             columnName:            description
         - dropColumn:
             tableName:             repository_document
             columnName:            extension
         - dropColumn:
             tableName:             repository_document
             columnName:            extent
         - dropColumn:
             tableName:             repository_document
             columnName:            lastModifiedDate
         - dropColumn:
             tableName:             repository_document
             columnName:            license
         - dropColumn:
             tableName:             repository_document
             columnName:            md5Sum
         - dropColumn:
             tableName:             repository_document
             columnName:            originalFilename
         - dropColumn:
             tableName:             repository_document
             columnName:            originalUrl
         - dropColumn:
             tableName:             repository_document
             columnName:            path
         - dropColumn:
             tableName:             repository_document
             columnName:            rightsHolder
         - dropColumn:
             tableName:             repository_document
             columnName:            sha1Sum
         - dropColumn:
             tableName:             repository_document
             columnName:            subject
         - dropColumn:
             tableName:             repository_document
             columnName:            title
         - dropColumn:
             tableName:             repository_document
             columnName:            uuid
         - dropColumn:
             tableName:             repository_document
             columnName:            active
         - dropColumn:
             tableName:             repository_document
             columnName:            createdBy
         - dropColumn:
             tableName:             repository_document
             columnName:            lastModifiedBy
         - dropColumn:
             tableName:             repository_document
             columnName:            size
         - dropColumn:
             tableName:             repository_document
             columnName:            folder_id

  # Activate FK constraints
- changeSet:
       id:                          1585750166969-4
       author:                      mborodenko
       comment:
       changes:
         - addForeignKeyConstraint:
             baseColumnNames:       id
             baseTableName:         repository_document
             constraintName:        FK_ffgq0lnuuk9x6u7qmrefj4ohn
             deferrable:            false
             initiallyDeferred:     false
             onDelete:              NO ACTION
             onUpdate:              NO ACTION
             referencedColumnNames: id
             referencedTableName:   repository_file
         - addForeignKeyConstraint:
             baseColumnNames:       id
             baseTableName:         repository_image
             constraintName:        FK_lsirk2eb67i23hc4i96k5sxgp
             deferrable:            false
             initiallyDeferred:     false
             onDelete:              NO ACTION
             onUpdate:              NO ACTION
             referencedColumnNames: id
             referencedTableName:   repository_file

- changeSet:
       id:                          1591332491000-1
       author:                      mobreza
       comment:
       changes:
        - oldTableName:             repositoryfolder
        - newTableName:             repository_folder

- changeSet:
       id:                           1662372157291-1
       author:                       ahrybeniuk
       comment:
       changes:
        - createTable:
            tableName:               database_file
            columns:
             - column:
                 autoIncrement:      true
                 constraints:
                     primaryKey:     true
                     primaryKeyName: PK_database_file
                 name:               database_file_id
                 type:               int
             - column:
                 constraints:
                     nullable:       false
                 name:               path
                 type:               nvarchar(250)
             - column:
                 constraints:
                     nullable:       false
                 name:               data
                 type:               blob
             - column:
                 constraints:
                   nullable:         false
                 name:               created_date
                 type:               datetime2
             - column:
                 constraints:
                     nullable:       false
                 name:               created_by
                 type:               bigint
             - column:
                 name:               modified_date
                 type:               datetime2
             - column:
                 name:               modified_by
                 type:               bigint
        - addForeignKeyConstraint:
            baseColumnNames:         created_by
            baseTableName:           database_file
            constraintName:          fk_database_file_created
            deferrable:              false
            initiallyDeferred:       false
            onDelete:                NO ACTION
            onUpdate:                NO ACTION
            referencedColumnNames:   id
            referencedTableName:     acl_sid
            validate:                true
        - addForeignKeyConstraint:
            baseColumnNames:         modified_by
            baseTableName:           database_file
            constraintName:          fk_database_file_modified
            deferrable:              false
            initiallyDeferred:       false
            onDelete:                NO ACTION
            onUpdate:                NO ACTION
            referencedColumnNames:   id
            referencedTableName:     acl_sid
            validate:                true
        - createIndex:
            columns:
            - column:
                name:               path
            indexName:               ndx_database_file_uniq_path
            tableName:               database_file
            unique:                  true




© 2015 - 2025 Weber Informatics LLC | Privacy Policy