Skip to content

Instantly share code, notes, and snippets.

@mariodavid
Created November 26, 2014 08:46
Show Gist options
  • Save mariodavid/e7666ad7b534f951f23e to your computer and use it in GitHub Desktop.
Save mariodavid/e7666ad7b534f951f23e to your computer and use it in GitHub Desktop.
database-migration changelog sequence-entity
databaseChangeLog = {
changeSet(author: "mario (generated)", id: "1416989310726-1") {
createTable(tableName: "D_SEQUENCEDEFINITION") {
column(autoIncrement: "true", name: "ID", type: "bigint") {
constraints(nullable: "false", primaryKey: "true", primaryKeyName: "D_SEQUENCEDEFPK")
}
column(name: "VERSION", type: "bigint") {
constraints(nullable: "false")
}
column(name: "FORMAT", type: "varchar(100)")
column(name: "NAME", type: "varchar(100)") {
constraints(nullable: "false")
}
column(name: "TENANT_ID", type: "bigint")
}
}
changeSet(author: "mario (generated)", id: "1416989310726-2") {
createTable(tableName: "D_SEQUENCENUMBER") {
column(autoIncrement: "true", name: "ID", type: "bigint") {
constraints(nullable: "false", primaryKey: "true", primaryKeyName: "D_SEQUENCENUMPK")
}
column(name: "VERSION", type: "bigint") {
constraints(nullable: "false")
}
column(name: "DEFINITION_id", type: "bigint") {
constraints(nullable: "false")
}
column(name: "sequence_group", type: "varchar(40)")
column(name: "number", type: "bigint") {
constraints(nullable: "false")
}
}
}
changeSet(author: "mario (generated)", id: "1416989310726-3") {
addColumn(tableName: "D_AUFTRAG") {
column(name: "AUFTRAGSNUMMER2", type: "varchar(20)") {
constraints(nullable: "false", unique: "true")
}
}
}
changeSet(author: "mario (generated)", id: "1416989310726-11") {
createIndex(indexName: "AUFTRAGSNUMMER2_uniq_1416989310433", tableName: "D_AUFTRAG", unique: "true") {
column(name: "AUFTRAGSNUMMER2")
}
}
changeSet(author: "mario (generated)", id: "1416989310726-12") {
createIndex(indexName: "unique_NAME", tableName: "D_SEQUENCEDEFINITION", unique: "true") {
column(name: "TENANT_ID")
column(name: "NAME")
}
}
changeSet(author: "mario (generated)", id: "1416989310726-13") {
createIndex(indexName: "unique_sequence_group", tableName: "D_SEQUENCENUMBER", unique: "true") {
column(name: "DEFINITION_id")
column(name: "sequence_group")
}
}
changeSet(author: "mario (generated)", id: "1416989310726-10") {
addForeignKeyConstraint(baseColumnNames: "DEFINITION_id", baseTableName: "D_SEQUENCENUMBER", constraintName: "FKA716FFA55EBCFCC6", deferrable: "false", initiallyDeferred: "false", referencedColumnNames: "ID", referencedTableName: "D_SEQUENCEDEFINITION", referencesUniqueColumn: "false")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment