db.changelog.20190808-artifact-versions-in-environments.yml Maven / Gradle / Ivy
databaseChangeLog:
- changeSet:
id: create-environment-artifact-version-table
author: fletch
changes:
- createTable:
tableName: environment_artifact_versions
columns:
- column:
name: environment_uid
type: char(26)
constraints:
nullable: false
- column:
name: artifact_uid
type: char(26)
constraints:
nullable: false
- column:
name: artifact_version
type: varchar(255)
constraints:
nullable: false
- column:
name: approved_at
type: timestamp
constraints:
nullable: true
- column:
name: deployed_at
type: timestamp
constraints:
nullable: true
- modifySql:
dbms: mysql
append:
value: " engine innodb"
rollback:
- dropTable:
tableName: environment_artifact_versions
- changeSet:
id: create-environment-artifact-version-indices
author: fletch
changes:
- addPrimaryKey:
constraintName: environment_artifact_versions_pk
tableName: environment_artifact_versions
columnNames: environment_uid, artifact_uid, artifact_version
- createIndex:
indexName: environment_artifact_versions_approved_at_idx
tableName: environment_artifact_versions
columns:
- column:
name: approved_at
- createIndex:
indexName: environment_artifact_versions_deployed_at_idx
tableName: environment_artifact_versions
columns:
- column:
name: deployed_at
rollback:
- dropPrimaryKey:
constraintName: environment_artifact_versions_pk
tableName: environment_artifact_versions
- dropIndex:
indexName: environment_artifact_versions_approved_at_idx
tableName: environment_artifact_versions
- dropIndex:
indexName: environment_artifact_versions_deployed_at_idx
tableName: environment_artifact_versions