-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.sql
32 lines (23 loc) · 828 Bytes
/
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
CREATE TABLE `users` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`fname` varchar(100) NULL,
`lname` varchar(100) NULL,
`api` varchar(50) DEFAULT NULL,
`role` int(11) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB;
CREATE TABLE `tickets` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
`body` varchar(100) NOT NULL,
`status` int(11) NOT NULL,
`userID` int(11) NOT NULL,
`date` datetime NOT NULL,
`answare` varchar(100),
FOREIGN KEY (`userID`) References `users` (`ID`),
PRIMARY KEY (`ID`)
)ENGINE=InnoDB;
INSERT INTO `users` VALUES (1,'amir','11041104','','','8534780b4edccd5904fe6d6110b76624',1);
INSERT INTO `users` VALUES (2,'ali','1','','','8534780b4edccd5904fe6d6110b22624',0);