-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinitial_db.sql
38 lines (31 loc) · 1.13 KB
/
initial_db.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
CREATE SCHEMA IF NOT EXISTS `db` ;
USE `db`;
CREATE TABLE IF NOT EXISTS `treatments` (
id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
fullName varchar(255) NOT NULL,
vehicle varchar(255) NOT NULL,
treatment varchar(255) NOT NULL,
cost int(7) NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME ON UPDATE CURRENT_TIMESTAMP,
mobile int(10) ZEROFILL NOT NULL,
email varchar(255) NOT NULL,
city varchar(255) NOT NULL,
img varchar(255) NOT NULL,
active BOOLEAN DEFAULT true
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `users` (
id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
name varchar(255) NOT NULL,
email varchar(255) NOT NULL,
password varchar(255) NOT NULL,
creation_time DATETIME DEFAULT CURRENT_TIMESTAMP,
modification_time DATETIME ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY unique_email (email)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `customers` (
id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
email varchar(255) NOT NULL,
name varchar(255) NOT NULL,
active BOOLEAN DEFAULT false
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;