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

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

There is a newer version: 4.6.0-alpha.2
Show newest version
databaseChangeLog:
  - changeSet:
      id: 3.9.0
      author: GraviteeSource Team
      changes:

        # Bot Detections
        ##############
        - createTable:
            tableName: bot_detections
            columns:
              - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
              - column: {name: reference_id, type: nvarchar(255), constraints: { nullable: false } }
              - column: {name: reference_type, type: nvarchar(64), constraints: { nullable: false } }
              - column: {name: type, type: nvarchar(64), constraints: { nullable: false } }
              - column: {name: detection_type, type: nvarchar(64), constraints: { nullable: false } }
              - column: {name: name, type: nvarchar(255), constraints: { nullable: true } }
              - column: {name: configuration, type: clob, constraints: { nullable: true } }
              - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
              - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_bot_detections
            columnNames: id
            tableName: bot_detections

        - createIndex:
            columns:
              - column:
                  name: reference_id
              - column:
                  name: reference_type
            indexName:  idx_bot_detections_domain
            tableName:  bot_detections
            unique:  false

        - sql:
            dbms: postgresql
            sql: "UPDATE roles SET permission_acls = jsonb_set(cast(permission_acls as jsonb), '{DOMAIN_BOT_DETECTION}', '[\"CREATE\",\"READ\", \"UPDATE\", \"DELETE\", \"LIST\"]', true)  WHERE name in ('ORGANIZATION_PRIMARY_OWNER', 'ORGANIZATION_OWNER', 'ENVIRONMENT_PRIMARY_OWNER', 'ENVIRONMENT_OWNER', 'DOMAIN_PRIMARY_OWNER', 'DOMAIN_OWNER');"

        - sql:
            dbms: mysql, mariadb
            sql: "UPDATE roles SET permission_acls = JSON_SET(permission_acls, '$.DOMAIN_BOT_DETECTION', JSON_ARRAY('CREATE', 'READ', 'UPDATE', 'DELETE', 'LIST')) WHERE name in ('ORGANIZATION_PRIMARY_OWNER', 'ORGANIZATION_OWNER', 'ENVIRONMENT_PRIMARY_OWNER', 'ENVIRONMENT_OWNER', 'DOMAIN_PRIMARY_OWNER', 'DOMAIN_OWNER');"

        - sql:
            dbms: mssql
            sql: "UPDATE roles SET permission_acls = JSON_MODIFY(permission_acls, '$.DOMAIN_BOT_DETECTION', JSON_QUERY('[\"CREATE\", \"READ\", \"UPDATE\", \"DELETE\", \"LIST\"]', '$')) WHERE name in ('ORGANIZATION_PRIMARY_OWNER', 'ORGANIZATION_OWNER', 'ENVIRONMENT_PRIMARY_OWNER', 'ENVIRONMENT_OWNER', 'DOMAIN_PRIMARY_OWNER', 'DOMAIN_OWNER');"

        # domains
        ########################
        - addColumn:
            tableName: domains
            columns:
              - column: { name: master, type: boolean, constraints: { nullable: true } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy