liquibase.changelogs.v3_8_0.schema.yml Maven / Gradle / Ivy
databaseChangeLog:
- changeSet:
id: 3.8.0
author: GraviteeSource Team
changes:
# service_resources
########################
- createTable:
tableName: service_resources
columns:
- column: {name: id, type: nvarchar(64), constraints: { nullable: false } }
- column: {name: type, type: nvarchar(64), constraints: { nullable: true } }
- column: {name: name, type: nvarchar(255), constraints: { nullable: true } }
- column: {name: configuration, type: clob, constraints: { nullable: true } }
- column: {name: reference_id, type: nvarchar(255), 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_service_resources
columnNames: id
tableName: service_resources
- createIndex:
columns:
- column:
name: reference_id
- column:
name: reference_type
indexName: idx_service_resources_refid
tableName: service_resources
unique: false
# domain hrid
########################
- addColumn:
tableName: domains
columns:
- column: {name: hrid, type: nvarchar(255), constraints: { nullable: true } }
- sql:
sql: "UPDATE domains SET hrid = id;"
- addNotNullConstraint:
columnName: hrid
columnDataType: nvarchar(255)
constraintName: domain_hrid_req
tableName: domains
validate: true
- createIndex:
columns:
- column:
name: reference_id
- column:
name: reference_type
- column:
name: hrid
indexName: idx_domains_ref_hrid
tableName: domains
unique: false
# webauthn_credentials aaguid index
########################
- createIndex:
columns:
- column:
name: reference_id
- column:
name: reference_type
- column:
name: aaguid
indexName: idx_webauthn_credentials_ref_aaguid
tableName: webauthn_credentials
unique: false
# node_monitoring
########################
- createTable:
tableName: node_monitoring
columns:
- column: { name: id, type: nvarchar(64), constraints: { nullable: false } }
- column: { name: node_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: created_at, type: timestamp(6), constraints: { nullable: true } }
- column: { name: updated_at, type: timestamp(6), constraints: { nullable: true } }
- column: { name: evaluated_at, type: timestamp(6), constraints: { nullable: true } }
- addPrimaryKey:
constraintName: pk_node_monitoring
columnNames: id
tableName: node_monitoring
- createIndex:
columns:
- column:
name: updated_at
- column:
name: type
indexName: idx_node_monitoring_updated_at_type
tableName: node_monitoring
unique: false