From 700d47b58486512688a1e6b25ac0e7ec56f49207 Mon Sep 17 00:00:00 2001 From: Anton Liauchuk Date: Sun, 11 Jul 2021 10:29:35 +0300 Subject: [PATCH] #14 users tables --- .../db/changelog/db.changelog-master.yml | 2 + .../src/main/resources/db/users.yml | 42 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 users/application/src/main/resources/db/users.yml diff --git a/configuration/src/main/resources/db/changelog/db.changelog-master.yml b/configuration/src/main/resources/db/changelog/db.changelog-master.yml index ef5397e..069da32 100644 --- a/configuration/src/main/resources/db/changelog/db.changelog-master.yml +++ b/configuration/src/main/resources/db/changelog/db.changelog-master.yml @@ -7,3 +7,5 @@ databaseChangeLog: file: "classpath*:/db/course-reviews.yml" - include: file: "classpath*:/db/courses.yml" + - include: + file: "classpath*:/db/users.yml" diff --git a/users/application/src/main/resources/db/users.yml b/users/application/src/main/resources/db/users.yml new file mode 100644 index 0000000..7258df4 --- /dev/null +++ b/users/application/src/main/resources/db/users.yml @@ -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)