added missing flyway and liquibase scripts

This commit is contained in:
Tom Hombergs
2019-03-01 16:24:24 +01:00
parent d01cccb574
commit f7e158a83c
2 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,103 @@
databaseChangeLog:
- preConditions:
- runningAs:
username: sa
- changeSet:
id: 1
author: hombergs
changes:
- createTable:
tableName: booking
columns:
- column:
name: id
type: bigint
autoIncrement: true
constraints:
primaryKey: true
nullable: false
- column:
name: customer_id
type: bigint
- column:
name: flight_number
type: varchar(50)
constraints:
nullable: false
- changeSet:
id: 2
author: hombergs
changes:
- createTable:
tableName: customer
columns:
- column:
name: id
type: bigint
autoIncrement: true
constraints:
primaryKey: true
nullable: false
- column:
name: name
type: varchar(50)
constraints:
nullable: false
- changeSet:
id: 3
author: hombergs
changes:
- createTable:
tableName: flight
columns:
- column:
name: flight_number
type: varchar(50)
constraints:
nullable: false
- column:
name: airline
type: varchar(50)
constraints:
nullable: false
- changeSet:
id: 4
author: hombergs
changes:
- createTable:
tableName: user
columns:
- column:
name: id
type: bigint
autoIncrement: true
constraints:
primaryKey: true
nullable: false
- column:
name: name
type: varchar(50)
constraints:
nullable: false
- column:
name: email
type: varchar(50)
constraints:
nullable: false
- column:
name: registration_date
type: timestamp
constraints:
nullable: false
- changeSet:
id: 5
author: hombergs
changes:
- createSequence:
sequenceName: hibernate_sequence

View File

@@ -0,0 +1,24 @@
create table booking (
id bigint,
customer_id bigint,
flight_number varchar
);
create table customer (
id bigint,
name varchar
);
create table flight (
flight_number varchar,
airline varchar
);
create table user (
id bigint,
name varchar,
email varchar,
registration_date timestamp
);
create sequence hibernate_sequence;