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

liquibase.changelogs.v3_0_2.schema.yml Maven / Gradle / Ivy

There is a newer version: 3.9.2
Show newest version
databaseChangeLog:
  - changeSet:
      id: 3.0.2
      author: GraviteeSource Team
      changes:
        ## rename View into Category
        - renameColumn:
            newColumnName: category
            oldColumnName: view
            columnDataType: nvarchar(64)
            tableName: api_views
        - renameTable:
            newTableName: api_categories
            oldTableName: api_views
        - renameTable:
            newTableName: categories
            oldTableName: views

        ## update existing view LINK to category LINK
        - sql:
            sql: update page_configuration set v='category' where k='resourceType' and v='view';

        ## update parameters keys
        # dbms: mariadb, mysql
        - sql:
            dbms: mariadb, mysql
            sql: update parameters set `key` = 'portal.apis.categoryMode.enabled' where `key`='portal.apis.viewMode.enabled';
        - sql:
            dbms: mariadb, mysql
            sql: update parameters set `key` = 'portal.apis.apiheader.showcategories.enabled' where `key`='portal.apis.apiheader.showviews.enabled';
        - sql:
            dbms: mariadb, mysql
            sql: update parameters set `key` = 'api.quality.metrics.categories.weight' where `key`='api.quality.metrics.views.weight';

        # dbms: postgresql
        - sql:
            dbms: postgresql
            sql: update parameters set "key" = 'portal.apis.categoryMode.enabled' where "key"='portal.apis.viewMode.enabled';
        - sql:
            dbms: postgresql
            sql: update parameters set "key" = 'portal.apis.apiheader.showcategories.enabled' where "key"='portal.apis.apiheader.showviews.enabled';
        - sql:
            dbms: postgresql
            sql: update parameters set "key" = 'api.quality.metrics.categories.weight' where "key"='api.quality.metrics.views.weight';

        # dbms: mssql
        - sql:
            dbms: mssql
            sql: update parameters set [key] = 'portal.apis.categoryMode.enabled' where [key]='portal.apis.viewMode.enabled';
        - sql:
            dbms: mssql
            sql: update parameters set [key] = 'portal.apis.apiheader.showcategories.enabled' where [key]='portal.apis.apiheader.showviews.enabled';
        - sql:
            dbms: mssql
            sql: update parameters set [key] = 'api.quality.metrics.categories.weight' where [key]='api.quality.metrics.views.weight';

        ## Update Audit logs to replace VIEW with CATEGORY
        - sql:
            sql: update audits set event='CATEGORY_CREATED' where event='VIEW_CREATED';
        - sql:
            sql: update audits set event='CATEGORY_UPDATED' where event='VIEW_UPDATED';
        - sql:
            sql: update audits set event='CATEGORY_DELETED' where event='VIEW_DELETED';
        - sql:
            dbms: mariadb, mysql
            sql: update audit_properties set `key` = 'CATEGORY' where `key`='VIEW';
        - sql:
            dbms: postgresql
            sql: update audit_properties set "key" = 'CATEGORY' where "key"='VIEW';
        - sql:
            dbms: mssql
            sql: update audit_properties set [key] = 'CATEGORY' where [key]='VIEW';

        ## Update Events payload
        - sql:
            sql: update events set payload = replace(payload, 'views', 'categories') where payload like '%views%';




© 2015 - 2025 Weber Informatics LLC | Privacy Policy