-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_init.sql
111 lines (91 loc) · 2.88 KB
/
db_init.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-- Adminer 4.7.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS customer;
CREATE TABLE customer (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(255) DEFAULT NULL,
bnid varchar(255) DEFAULT NULL,
win mediumtext,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS groupRoles;
CREATE TABLE groupRoles (
groupID int(11) DEFAULT NULL,
emailList varchar(255) DEFAULT NULL,
groupName varchar(255) DEFAULT NULL,
locked int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS legacyRecords;
CREATE TABLE legacyRecords (
cosID int(11) DEFAULT NULL,
empyID int(11) DEFAULT NULL,
location int(11) DEFAULT NULL,
date timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS legacyShifts;
CREATE TABLE legacyShifts (
shiftID int(11) NOT NULL,
coveredBy int(11) DEFAULT NULL,
postedBy int(11) DEFAULT NULL,
postedDate datetime DEFAULT CURRENT_TIMESTAMP,
availability tinyint(4) DEFAULT NULL,
positionID int(11) DEFAULT NULL,
groupID int(11) DEFAULT NULL,
perm tinyint(4) DEFAULT NULL,
message varchar(255) DEFAULT NULL,
shiftDateEnd mediumtext,
shiftDateStart mediumtext,
PRIMARY KEY (shiftID)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS location;
CREATE TABLE location (
id int(11) NOT NULL,
locationName varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS positions;
CREATE TABLE positions (
id int(11) NOT NULL AUTO_INCREMENT,
groupID int(11) DEFAULT NULL,
posName varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS records;
CREATE TABLE records (
cosID int(11) DEFAULT NULL,
empyID int(11) DEFAULT NULL,
location int(11) DEFAULT NULL,
date timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS shifts;
CREATE TABLE shifts (
shiftID int(11) NOT NULL AUTO_INCREMENT,
coveredBy int(11) DEFAULT NULL,
postedBy int(11) DEFAULT NULL,
postedDate datetime DEFAULT CURRENT_TIMESTAMP,
availability tinyint(4) DEFAULT NULL,
positionID int(11) DEFAULT NULL,
groupID int(11) DEFAULT NULL,
perm tinyint(4) DEFAULT NULL,
message varchar(255) DEFAULT NULL,
shiftDateEnd mediumtext,
shiftDateStart mediumtext,
PRIMARY KEY (shiftID)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id int(11) NOT NULL AUTO_INCREMENT,
empyname varchar(255) DEFAULT NULL,
surname varchar(255) DEFAULT NULL,
password varchar(255) DEFAULT NULL,
role int(11) DEFAULT NULL,
empybnid varchar(255) DEFAULT NULL,
email varchar(255) DEFAULT NULL,
groupRole int(11) DEFAULT NULL,
locked int(11) DEFAULT 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- 2020-03-04 15:47:51