diff options
| author | Felix Kehrer <felix.kehrer@gmail.com> | 2018-05-07 14:56:27 +0200 | 
|---|---|---|
| committer | Felix Kehrer <felix.kehrer@gmail.com> | 2018-05-07 14:56:27 +0200 | 
| commit | e7e7c52e3c8f445d95aaaad1b285d49d075623e3 (patch) | |
| tree | 59758513019c499577a70f4e9b72b5b43608ec83 /src/main/resources/sql | |
| parent | 12302ff88604440cac2257741b4502b9b173d708 (diff) | |
| parent | 783aad0bd343a0c5a008ed1433d9958ea8e5e7a2 (diff) | |
| download | sepm-groupproject-e7e7c52e3c8f445d95aaaad1b285d49d075623e3.tar.gz sepm-groupproject-e7e7c52e3c8f445d95aaaad1b285d49d075623e3.tar.xz sepm-groupproject-e7e7c52e3c8f445d95aaaad1b285d49d075623e3.zip  | |
Merge branch 'employee_list' into fahrzeug_anmelden
Diffstat (limited to 'src/main/resources/sql')
| -rw-r--r-- | src/main/resources/sql/database.sql | 17 | 
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main/resources/sql/database.sql b/src/main/resources/sql/database.sql index bb23c91..e775550 100644 --- a/src/main/resources/sql/database.sql +++ b/src/main/resources/sql/database.sql @@ -1,26 +1,30 @@  CREATE TABLE IF NOT EXISTS VehicleVersion (    id BIGINT AUTO_INCREMENT PRIMARY KEY,    name VARCHAR(100) NOT NULL, -  constructionType ENUM('Normal', 'Hochdach', 'Mittelhochdach') NOT NULL, -  type ENUM('BKTW', 'KTW-B', 'KTW', 'RTW', 'NEF', 'NAH') NOT NULL, +  constructionType VARCHAR NOT NULL, +  type VARCHAR NOT NULL,    hasNef BOOLEAN NOT NULL, +  CHECK constructionType IN ('Normal', 'Hochdach', 'Mittelhochdach'), +  CHECK type IN ('BKTW', 'KTW-B', 'KTW', 'RTW', 'NEF', 'NAH')  );  CREATE TABLE IF NOT EXISTS Vehicle (    id BIGINT AUTO_INCREMENT PRIMARY KEY,    version BIGINT NOT NULL, -  status ENUM('abgemeldet', 'frei_wache', 'zum_berufungsort', 'am_berufungsort', 'zum_zielort', -              'am_zielort', 'frei_funk', 'deleted') NOT NULL, +  status VARCHAR NOT NULL,    FOREIGN KEY (version) REFERENCES VehicleVersion(id), +  CHECK status IN ('abgemeldet', 'frei_wache', 'zum_berufungsort', 'am_berufungsort', 'zum_zielort', +              'am_zielort', 'frei_funk', 'deleted')  );  CREATE TABLE IF NOT EXISTS EmployeeVersion (    id BIGINT AUTO_INCREMENT PRIMARY KEY,    name VARCHAR(100) NOT NULL,    birthday DATE NOT NULL, -  educationLevel ENUM('RS', 'NFS', 'NKV', 'NKA', 'NKI', 'NA') NOT NULL, +  educationLevel VARCHAR NOT NULL,    isDriver BOOLEAN NOT NULL,    isPilot BOOLEAN NOT NULL, +  CHECK educationLevel IN ('RS', 'NFS', 'NKV', 'NKA', 'NKI', 'NA')  );  CREATE TABLE IF NOT EXISTS Employee ( @@ -43,10 +47,11 @@ CREATE TABLE IF NOT EXISTS Registration (  CREATE TABLE IF NOT EXISTS Operation (    id BIGINT AUTO_INCREMENT PRIMARY KEY,    opCode VARCHAR(20) NOT NULL, -  severity ENUM('A', 'B', 'C', 'D', 'E', 'O') NOT NULL, +  severity VARCHAR NOT NULL,    created TIMESTAMP NOT NULL,    destination VARCHAR(100) NOT NULL,    additionalInfo VARCHAR(100), +  CHECK severity IN ('A', 'B', 'C', 'D', 'E', 'O')  );  CREATE TABLE IF NOT EXISTS VehicleOperation (  | 
