Skip to content

Instantly share code, notes, and snippets.

@KiryhaPikoff
Created July 8, 2020 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KiryhaPikoff/c29fc57e2a5bd56ecbaac40ea79a30c1 to your computer and use it in GitHub Desktop.
Save KiryhaPikoff/c29fc57e2a5bd56ecbaac40ea79a30c1 to your computer and use it in GitHub Desktop.
##############################################< USER >#################################################
- changeSet:
id: 07-07-20_00
author: KiryhaPikoff
preConditions:
- onFail: MARK_RAN
- not:
tableExists:
tableName: user
changes:
- createTable:
columns:
- column:
autoIncrement: true
constraints:
primaryKey: true
primaryKeyName: user_pk
name: id
type: BIGINT
- column:
constraints:
unique: true
nullable: false
name: email
type: VARCHAR(255)
- column:
constraints:
unique: true
nullable: false
name: nick
type: VARCHAR(255)
- column:
constraints:
nullable: false
name: password
type: VARCHAR(255)
tableName: user
##############################################< PROJECT >###############################################
- changeSet:
id: 07-07-20_00
author: KiryhaPikoff
preConditions:
- onFail: MARK_RAN
- not:
tableExists:
tableName: project
changes:
- createTable:
columns:
- column:
autoIncrement: true
constraints:
primaryKey: true
primaryKeyName: project_pk
name: id
type: BIGINT
- column:
constraints:
nullable: false
name: name
type: VARCHAR(255)
tableName: user
##############################################< CONTRIBUTION >########################################
- changeSet:
id: 07-07-20_00
author: KiryhaPikoff
preConditions:
- onFail: MARK_RAN
- not:
tableExists:
tableName: contribution
changes:
- createTable:
columns:
- column:
autoIncrement: true
constraints:
primaryKey: true
primaryKeyName: contribution_pk
name: id
type: bigint
- column:
name: user_id
type: BIGINT
constraints:
nullable: false
foreignKeyName: contribution_user_fk
references: user(id)
- column:
name: project_id
type: BIGINT
constraints:
nullable: false
foreignKeyName: contribution_project_fk
references: project(id)
- column:
constraints:
nullable: false
name: role
type: VARCHAR(255)
- column:
constraints:
nullable: false
name: status
type: VARCHAR(255)
tableName: contribution
##############################################< TASK >###############################################
- changeSet:
id: 07-07-20_00
author: KiryhaPikoff
preConditions:
- onFail: MARK_RAN
- not:
tableExists:
tableName: task
changes:
- createTable:
columns:
- column:
autoIncrement: true
constraints:
primaryKey: true
primaryKeyName: task_pk
name: id
type: bigint
- column:
name: contribution_id
type: BIGINT
constraints:
nullable: false
foreignKeyName: task_contribution_fk
references: contribution(id)
- column:
constraints:
nullable: false
name: description
type: TEXT
- column:
constraints:
nullable: false
name: status
type: VARCHAR(255)
tableName: task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment