liquibase.changelogs.v4_0_0.schema.yml Maven / Gradle / Ivy
databaseChangeLog:
- changeSet:
id: 4.0.0
author: GraviteeSource Team
changes:
# ################
# Event Latest changes
# ################
- createTable:
tableName: ${gravitee_prefix}events_latest
columns:
- column: {name: id, type: nvarchar(64), constraints: { nullable: false, primaryKey: true, primaryKeyName: pk_events_latest } }
- column: {name: type, type: nvarchar(64), constraints: { nullable: false } }
- column: {name: payload, type: nclob, constraints: { nullable: true } }
- 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 } }
- createIndex:
indexName: idx_${gravitee_prefix}events_latest_type
columns:
- column:
name: type
type: nvarchar(64)
tableName: ${gravitee_prefix}events_latest
- createIndex:
indexName: idx_${gravitee_prefix}events_latest_updatedat
columns:
- column:
name: updated_at
type: timestamp(6)
tableName: ${gravitee_prefix}events_latest
- createTable:
tableName: ${gravitee_prefix}events_latest_properties
columns:
- column: {name: event_id, type: nvarchar(64), constraints: { nullable: false, primaryKey: true, primaryKeyName: pk_events_latest_properties } }
- column: {name: property_key, type: nvarchar(64), constraints: { nullable: false, primaryKey: true, primaryKeyName: pk_events_latest_properties } }
- column: {name: property_value, type: nvarchar(256), constraints: { nullable: true } }
- createIndex:
indexName: idx_${gravitee_prefix}events_latest_properties_propertykey
columns:
- column:
name: property_key
type: nvarchar(64)
tableName: ${gravitee_prefix}events_latest_properties
- createTable:
tableName: ${gravitee_prefix}events_latest_environments
columns:
- column: { name: event_id, type: nvarchar(64), constraints: { nullable: false, primaryKey: true, primaryKeyName: pk_events_latest_environments } }
- column: { name: environment_id, type: nvarchar(64), constraints: { nullable: false, primaryKey: true, primaryKeyName: pk_events_latest_environments } }
- createTable:
tableName: ${gravitee_prefix}upgraders
columns:
- column: { name: id, type: nvarchar(255), constraints: { nullable: false, primaryKey: true, primaryKeyName: pk_upgraders } }
- column: { name: applied_at, type: timestamp(6), constraints: { nullable: false } }
- dropColumn:
columnName: author_picture
tableName: ${gravitee_prefix}promotions
# ################
# Addition of the mode field for plan entity
# ################
- addColumn:
tableName: ${gravitee_prefix}plans
columns:
- column:
name: mode
type: nvarchar(64)
constraints:
nullable: true
default: STANDARD
- update:
columns:
- column:
name: mode
value: STANDARD
tableName: ${gravitee_prefix}plans
where: security<>'SUBSCRIPTION'
- update:
columns:
- column:
name: mode
value: PUSH
- column:
name: security
value: NULL
tableName: ${gravitee_prefix}plans
where: security='SUBSCRIPTION'
# ################
# Update the subscription type
# ################
- update:
columns:
- column:
name: type
value: PUSH
tableName: ${gravitee_prefix}subscriptions
where: type='SUBSCRIPTION'
© 2015 - 2025 Weber Informatics LLC | Privacy Policy