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

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

databaseChangeLog:
    - changeSet:
        id: 1.14.0
        author: GraviteeSource Team
        changes:
        - createTable:
            tableName: ${gravitee_prefix}users
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: username, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: source, type: nvarchar(128), constraints: { nullable: true } }
                - column: {name: source_id, type: nvarchar(128), constraints: { nullable: true } }
                - column: {name: password, type: nvarchar(128), constraints: { nullable: true } }
                - column: {name: email, type: nvarchar(128), constraints: { nullable: true } }
                - column: {name: firstname, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: lastname, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: last_connection_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: picture, type: nclob, constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}users
            columnNames: id
            tableName: ${gravitee_prefix}users

        - createTable:
            tableName: ${gravitee_prefix}user_roles
            columns:
                - column: {name: username, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: role, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}user_roles
            columnNames: username, role
            tableName: ${gravitee_prefix}user_roles

        - createTable:
            tableName: ${gravitee_prefix}apis
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: description, type: nvarchar(4000), constraints: { nullable: true } }
                - column: {name: version, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: definition, type: nclob, constraints: { nullable: false } }
                - column: {name: deployed_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: visibility, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: lifecycle_state, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: picture, type: nclob, constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}apis
            columnNames: id
            tableName: ${gravitee_prefix}apis

        - createIndex:
            indexName: idx_${gravitee_prefix}apis_visibility
            columns:
            - column:
                name: visibility
                type: nvarchar(64)
            tableName: ${gravitee_prefix}apis

        - createTable:
            tableName: ${gravitee_prefix}api_views
            columns:
                - column: {name: api_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: view, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}api_views
            columnNames: api_id, view
            tableName: ${gravitee_prefix}api_views

        - createTable:
            tableName: ${gravitee_prefix}api_tags
            columns:
                - column: {name: api_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: tag, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}api_tags
            columnNames: api_id, tag
            tableName: ${gravitee_prefix}api_tags

        - createTable:
            tableName: ${gravitee_prefix}keys
            columns:
                - column: {name: key, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: subscription, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: application, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: plan, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: revoked, type: boolean, constraints: { nullable: false } }
                - column: {name: revoked_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: expire_at, type: timestamp(6), 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_${gravitee_prefix}keys
            columnNames: key
            tableName: ${gravitee_prefix}keys

        - createIndex:
            indexName: idx_${gravitee_prefix}keys_plan
            columns:
            - column:
                name: plan
                type: nvarchar(64)
            tableName: ${gravitee_prefix}keys

        - createIndex:
            indexName: idx_${gravitee_prefix}keys_application
            columns:
            - column:
                name: application
                type: nvarchar(64)
            tableName: ${gravitee_prefix}keys

        - createIndex:
            indexName: idx_${gravitee_prefix}keys_updatedat
            columns:
            - column:
                name: updated_at
                type: timestamp(6)
            tableName: ${gravitee_prefix}keys

        - createIndex:
            indexName: idx_${gravitee_prefix}keys_revoked
            columns:
            - column:
                name: revoked
                type: boolean
            tableName: ${gravitee_prefix}keys

        - createIndex:
            indexName: idx_${gravitee_prefix}keys_plan_revoked_updatedat
            columns:
            - column:
                name: plan
                type: nvarchar(64)
            - column:
                name: revoked
                type: boolean
            - column:
                name: updated_at
                type: timestamp(6)
            tableName: ${gravitee_prefix}keys

        - createTable:
            tableName: ${gravitee_prefix}events
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: payload, type: nclob, constraints: { nullable: false } }
                - column: {name: parent_id, type: nvarchar(64), 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_${gravitee_prefix}events
            columnNames: id
            tableName: ${gravitee_prefix}events

        - createIndex:
            indexName: idx_${gravitee_prefix}events_type
            columns:
            - column:
                name: type
                type: nvarchar(64)
            tableName: ${gravitee_prefix}events

        - createIndex:
            indexName: idx_${gravitee_prefix}events_updatedat
            columns:
            - column:
                name: updated_at
                type: timestamp(6)
            tableName: ${gravitee_prefix}events

        - createTable:
            tableName: ${gravitee_prefix}event_properties
            columns:
                - column: {name: event_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: property_key, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: property_value, type: nvarchar(256), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}event_properties
            columnNames: event_id, property_key
            tableName: ${gravitee_prefix}event_properties

        - createIndex:
            indexName: idx_${gravitee_prefix}eventproperties_propertykey
            columns:
            - column:
                name: property_key
                type: nvarchar(64)
            tableName: ${gravitee_prefix}event_properties

        - createTable:
            tableName: ${gravitee_prefix}views
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: description, type: nvarchar(4000), constraints: { nullable: true } }
                - column: {name: default_view, type: boolean, constraints: { nullable: true } }
                - column: {name: hidden, type: boolean, constraints: { nullable: true } }
                - column: {name: order, type: int, 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_${gravitee_prefix}views
            columnNames: id
            tableName: ${gravitee_prefix}views

        - createTable:
            tableName: ${gravitee_prefix}tags
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: description, type: nvarchar(4000), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}tags
            columnNames: id
            tableName: ${gravitee_prefix}tags

        - createTable:
            tableName: ${gravitee_prefix}tenants
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: description, type: nvarchar(4000), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}tenants
            columnNames: id
            tableName: ${gravitee_prefix}tenants

        - createTable:
            tableName: ${gravitee_prefix}applications
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: description, type: nvarchar(4000), constraints: { nullable: true } }
                - column: {name: type, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: status, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: client_id, type: nvarchar(64), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}applications
            columnNames: id
            tableName: ${gravitee_prefix}applications

        - createIndex:
            indexName: idx_${gravitee_prefix}applications_name
            columns:
            - column:
                name: name
                type: nvarchar(64)
            tableName: ${gravitee_prefix}applications

        - createIndex:
            indexName: idx_${gravitee_prefix}applications_status
            columns:
            - column:
                name: status
                type: nvarchar(64)
            tableName: ${gravitee_prefix}applications

        - createTable:
            tableName: ${gravitee_prefix}groups
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}groups
            columnNames: id
            tableName: ${gravitee_prefix}groups

        - createTable:
            tableName: ${gravitee_prefix}group_administrators
            columns:
                - column: {name: group_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: administrator, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}group_administrators
            columnNames: group_id, administrator
            tableName: ${gravitee_prefix}group_administrators

        - createTable:
            tableName: ${gravitee_prefix}memberships
            columns:
                - column: {name: user_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}memberships
            columnNames: user_id, reference_type, reference_id
            tableName: ${gravitee_prefix}memberships

        - createIndex:
            indexName: idx_${gravitee_prefix}memberships_referenceid_referencetype
            columns:
            - column:
                name: reference_id
                type: nvarchar(64)
            - column:
                name: reference_type
                type: nvarchar(64)
            tableName: ${gravitee_prefix}memberships

        - createIndex:
            indexName: idx_${gravitee_prefix}memberships_userid_referencetype
            columns:
            - column:
                name: user_id
                type: nvarchar(64)
            - column:
                name: reference_type
                type: nvarchar(64)
            tableName: ${gravitee_prefix}memberships

        - createTable:
            tableName: ${gravitee_prefix}pages
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: content, type: nclob, constraints: { nullable: true } }
                - column: {name: last_contributor, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: order, type: int, constraints: { nullable: false } }
                - column: {name: api, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: published, type: boolean, constraints: { nullable: false } }
                - column: {name: source_type, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: source_configuration, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: configuration_try_it_url, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: configuration_try_it, type: boolean, constraints: { nullable: true } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: homepage, type: boolean, constraints: { nullable: false, default: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}pages
            columnNames: id
            tableName: ${gravitee_prefix}pages

        - createIndex:
            indexName: idx_${gravitee_prefix}pages_api
            columns:
            - column:
                name: api
                type: nvarchar(64)
            tableName: ${gravitee_prefix}pages

        - createTable:
            tableName: ${gravitee_prefix}plans
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: type, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: description, type: nclob, constraints: { nullable: true } }
                - column: {name: validation, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: definition, type: nclob, constraints: { nullable: true } }
                - column: {name: order, type: int, constraints: { nullable: true } }
                - column: {name: status, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: security, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: published_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: closed_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}plans
            columnNames: id
            tableName: ${gravitee_prefix}plans

        - createTable:
            tableName: ${gravitee_prefix}plan_apis
            columns:
                - column: {name: plan_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: api, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}plan_apis
            columnNames: plan_id, api
            tableName: ${gravitee_prefix}plan_apis

        - createIndex:
            indexName: idx_${gravitee_prefix}planapis_api
            columns:
            - column:
                name: api
                type: nvarchar(64)
            tableName: ${gravitee_prefix}plan_apis

        - createTable:
            tableName: ${gravitee_prefix}plan_characteristics
            columns:
                - column: {name: plan_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: characteristic, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}plan_characteristics
            columnNames: plan_id, characteristic
            tableName: ${gravitee_prefix}plan_characteristics

        - createTable:
            tableName: ${gravitee_prefix}subscriptions
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: plan, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: application, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: starting_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: ending_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: processed_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: processed_by, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: subscribed_by, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: reason, type: nvarchar(1024), constraints: { nullable: true } }
                - column: {name: status, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: api, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: client_id, type: nvarchar(64), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}subscriptions
            columnNames: id
            tableName: ${gravitee_prefix}subscriptions

        - createIndex:
            indexName: idx_${gravitee_prefix}subscriptions_plan
            columns:
            - column:
                name: plan
                type: nvarchar(64)
            tableName: ${gravitee_prefix}subscriptions

        - createIndex:
            indexName: idx_${gravitee_prefix}subscriptions_application
            columns:
            - column:
                name: application
                type: nvarchar(64)
            tableName: ${gravitee_prefix}subscriptions

        - createTable:
            tableName: ${gravitee_rate_limit_prefix}ratelimit
            columns:
                - column: {name: key, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: counter, type: bigint, constraints: { nullable: false } }
                - column: {name: last_request, type: bigint, constraints: { nullable: false } }
                - column: {name: reset_time, type: bigint, constraints: { nullable: false } }
                - column: {name: created_at, type: bigint, constraints: { nullable: false } }
                - column: {name: updated_at, type: bigint, constraints: { nullable: false } }
                - column: {name: async, type: boolean, constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_rate_limit_prefix}ratelimit
            columnNames: key
            tableName: ${gravitee_rate_limit_prefix}ratelimit

        - createTable:
            tableName: ${gravitee_prefix}metadata
            columns:
                - column: {name: key, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_type, type: nvarchar(32), constraints: { nullable: false } }
                - column: {name: reference_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(1024), constraints: { nullable: false } }
                - column: {name: format, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: value, type: nvarchar(1024), 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_${gravitee_prefix}metadata
            columnNames: key, reference_type, reference_id
            tableName: ${gravitee_prefix}metadata

        - createTable:
            tableName: ${gravitee_prefix}api_labels
            columns:
                - column: {name: api_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: label, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}api_labels
            columnNames: api_id, label
            tableName: ${gravitee_prefix}api_labels

        - createTable:
            tableName: ${gravitee_prefix}roles
            columns:
                - column: {name: scope, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: name, type: nvarchar(128), constraints: { nullable: false } }
                - column: {name: description, type: nvarchar(1024), constraints: { nullable: true } }
                - column: {name: default_role, type: boolean, constraints: { nullable: false, default: false } }
                - column: {name: system, type: boolean, constraints: { nullable: false, default: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}roles
            columnNames: scope, name
            tableName: ${gravitee_prefix}roles

        - createTable:
            tableName: ${gravitee_prefix}role_permissions
            columns:
                - column: {name: role_scope, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: role_name, type: nvarchar(128), constraints: { nullable: false } }
                - column: {name: permission, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}role_permissions
            columnNames: role_scope, role_name, permission
            tableName: ${gravitee_prefix}role_permissions

        - createTable:
            tableName: ${gravitee_prefix}group_event_rules
            columns:
                - column: {name: group_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: group_event, type: nvarchar(64), constraints: { nullable: false } }

        - createTable:
            tableName: ${gravitee_prefix}api_groups
            columns:
                - column: {name: api_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: group_id, type: nvarchar(64), constraints: { nullable: false } }

        - createTable:
            tableName: ${gravitee_prefix}application_groups
            columns:
                - column: {name: application_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: group_id, type: nvarchar(64), constraints: { nullable: false } }

        - createTable:
            tableName: ${gravitee_prefix}membership_roles
            columns:
                - column: {name: user_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: role_scope, type: int, constraints: { nullable: false } }
                - column: {name: role_name, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}membership_roles
            columnNames: user_id, reference_type, reference_id, role_scope
            tableName: ${gravitee_prefix}membership_roles

        - createTable:
            tableName: ${gravitee_prefix}audits
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: user, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: event, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: patch, type: nclob, constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}audits
            columnNames: id
            tableName: ${gravitee_prefix}audits

        - createIndex:
            indexName: idx_${gravitee_prefix}audits_referencetype_referenceid
            columns:
            - column:
                name: reference_type
                type: nvarchar(64)
            - column:
                name: reference_id
                type: nvarchar(64)
            tableName: ${gravitee_prefix}audits

        - createIndex:
            indexName: idx_${gravitee_prefix}audits_createdat
            columns:
            - column:
                name: created_at
                type: timestamp(6)
            tableName: ${gravitee_prefix}audits

        - createTable:
            tableName: ${gravitee_prefix}audit_properties
            columns:
                - column: {name: audit_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: key, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: value, type: nvarchar(200), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}audit_properties
            columnNames: audit_id, key, value
            tableName: ${gravitee_prefix}audit_properties

        - createTable:
            tableName: ${gravitee_prefix}ratings
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: api, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: user, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: rate, type: tinyint, constraints: { nullable: false } }
                - column: {name: title, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: comment, type: nvarchar(1024), 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_${gravitee_prefix}ratings
            columnNames: id
            tableName: ${gravitee_prefix}ratings

        - createIndex:
            indexName: idx_${gravitee_prefix}ratings_api
            columns:
            - column:
                name: api
                type: nvarchar(64)
            tableName: ${gravitee_prefix}ratings

        - createTable:
            tableName: ${gravitee_prefix}rating_answers
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: rating, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: user, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: comment, type: nvarchar(1024), constraints: { nullable: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}rating_answers
            columnNames: id
            tableName: ${gravitee_prefix}rating_answers

        - createIndex:
            indexName: idx_${gravitee_prefix}ratinganswers_rating
            columns:
            - column:
                name: rating
                type: nvarchar(64)
            tableName: ${gravitee_prefix}rating_answers

        - createTable:
            tableName: ${gravitee_prefix}page_excluded_groups
            columns:
                - column: {name: page_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: excluded_group, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}page_excluded_groups
            columnNames: page_id, excluded_group
            tableName: ${gravitee_prefix}page_excluded_groups

        - createTable:
            tableName: ${gravitee_prefix}plan_excluded_groups
            columns:
                - column: {name: plan_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: excluded_group, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}plan_excluded_groups
            columnNames: plan_id, excluded_group
            tableName: ${gravitee_prefix}plan_excluded_groups

        - createTable:
            tableName: ${gravitee_prefix}parameters
            columns:
                - column: {name: key, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: value, type: nvarchar(4000), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}parameters
            columnNames: key
            tableName: ${gravitee_prefix}parameters

        - createTable:
            tableName: ${gravitee_prefix}portal_notifications
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: title, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: message, type: nvarchar(4000), constraints: { nullable: false } }
                - column: {name: user, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}portal_notifications
            columnNames: id
            tableName: ${gravitee_prefix}portal_notifications

        - createTable:
            tableName: ${gravitee_prefix}portal_notification_configs
            columns:
                - column: {name: user, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}portal_notification_configs
            columnNames: user, reference_type, reference_id
            tableName: ${gravitee_prefix}portal_notification_configs

        - createTable:
            tableName: ${gravitee_prefix}portal_notification_config_hooks
            columns:
                - column: {name: user, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: hook, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}portal_notification_config_hooks
            columnNames: user, reference_type, reference_id, hook
            tableName: ${gravitee_prefix}portal_notification_config_hooks

        - createTable:
            tableName: ${gravitee_prefix}generic_notification_configs
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false  } }
                - column: {name: name, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: notifier, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: config, type: nvarchar(64), constraints: { nullable: true } }
                - column: {name: reference_id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: reference_type, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: created_at, type: timestamp(6), constraints: { nullable: true } }
                - column: {name: updated_at, type: timestamp(6), constraints: { nullable: true } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}generic_notification_configs
            columnNames: id
            tableName: ${gravitee_prefix}generic_notification_configs

        - createTable:
            tableName: ${gravitee_prefix}generic_notification_config_hooks
            columns:
                - column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
                - column: {name: hook, type: nvarchar(64), constraints: { nullable: false } }

        - addPrimaryKey:
            constraintName: pk_${gravitee_prefix}generic_notification_config_hooks
            columnNames: id, hook
            tableName: ${gravitee_prefix}generic_notification_config_hooks




© 2015 - 2025 Weber Informatics LLC | Privacy Policy