db.changelog.20190802-create-resource-last-checked-table.yml Maven / Gradle / Ivy
databaseChangeLog:
- changeSet:
id: create-resource-last-checked-table
author: fletch
changes:
- createTable:
tableName: resource_last_checked
columns:
- column:
name: resource_uid
type: char(26)
constraints:
unique: true
nullable: false
- column:
name: at
type: timestamp
# MySQL is stupid and won't let you insert a zero valued TIMESTAMP
defaultValueDate: "1970-01-01T00:00:01"
constraints:
nullable: false
- modifySql:
dbms: mysql
append:
value: " engine innodb"
rollback:
- dropTable:
tableName: resources_last_checked
- changeSet:
id: create-resource-last-checked-indicies
author: fletch
changes:
- createIndex:
indexName: resource_last_checked_at_idx
tableName: resource_last_checked
columns:
- column:
name: at