Skip to content

Commit

Permalink
anton-liauchuk#14 users tables
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-liauchuk committed Jul 11, 2021
1 parent 7481187 commit 700d47b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ databaseChangeLog:
file: "classpath*:/db/course-reviews.yml"
- include:
file: "classpath*:/db/courses.yml"
- include:
file: "classpath*:/db/users.yml"
42 changes: 42 additions & 0 deletions users/application/src/main/resources/db/users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
databaseChangeLog:
- changeSet:
id: 2021_06_25-1
author: antonliauchuk
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: user
changes:
- createTable:
tableName: user
columns:
- column:
name: id
type: int
autoIncrement: true
startWith: 1
incrementBy: 1
constraints:
primaryKey: true
primaryKeyName: user_pk
- column:
constraints:
nullable: false
name: username
type: VARCHAR(100)
- column:
constraints:
nullable: false
name: email
type: VARCHAR(100)
- column:
constraints:
nullable: false
name: password
type: VARCHAR(100)
- column:
constraints:
nullable: false
name: role
type: VARCHAR(100)

0 comments on commit 700d47b

Please sign in to comment.