Skip to content

Instantly share code, notes, and snippets.

@alexandre-jacquot-ptl
Last active May 22, 2024 10:18
Show Gist options
  • Save alexandre-jacquot-ptl/dfe83b6de72688f6f52f4240638d5b05 to your computer and use it in GitHub Desktop.
Save alexandre-jacquot-ptl/dfe83b6de72688f6f52f4240638d5b05 to your computer and use it in GitHub Desktop.
r2dbc liquibase
databaseChangeLog:
...
- changeSet:
id: create-item-table
author: ajacquot
changes:
- createTable:
schema: public
tableName: item
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
nullable: false
- column:
name: version
type: int
constraints:
nullable: false
- column:
name: status
type: varchar(15)
constraints:
nullable: false
- column:
name: description
type: varchar(4000)
constraints:
nullable: false
- column:
name: assignee_id
type: int
constraints:
foreignKeyName: fk_item_assignee_id
references: person(id)
- column:
name: created_date
type: timestamp
defaultValueComputed: CURRENT_TIMESTAMP
constraints:
nullable: false
- column:
name: last_modified_date
type: timestamp
defaultValueComputed: CURRENT_TIMESTAMP
constraints:
nullable: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment