sample.sql 2.63 KB
Newer Older
Zohten's avatar
Zohten committed
1
/*Passer IP en clé primaire et jarter ID_BLACKLIST ?*/
Zohten's avatar
Zohten committed
2 3 4 5 6 7 8 9 10 11
INSERT INTO MJ_BLACKLIST_IP (ID_BLACKLIST, IP, DATE_BAN) 
VALUES
(1,'192.1.1.51' ,'2020/10/22'),
(2,'192.1.1.52' ,'2020/11/20');

INSERT INTO MJ_ROLE (ID_ROLE, NAME) 
VALUES
(1,'Membre'),
(2,'Admin');

Zohten's avatar
Zohten committed
12
/* Password lenght to 80*/
Zohten's avatar
Zohten committed
13 14
INSERT INTO `MJ_USER` (`ID_USER`, `ID_ROLE`, `LOGIN`, `PASWORD`, `AVATAR`, `LASTNAME`, `FIRSTNAME`, `MAIL`, `BAN_ACCOUNT`, `LAST_IP`) 
VALUES
15 16 17 18 19 20 21
(1, 1, 'pierrp59', 'hashedpierrepwd', 'becky.jpg', 'pierre', 'poljak', 'pierre.poljak@free.fr', 0, '92.169.12.1'),
(2, 1, 'johnd62', 'hashedjohnpwd', 'crystale.jpg', 'john', 'doe', 'john.doe@free.fr', 0, '92.169.12.2'),
(3, 1, 'dupontd95', 'hasheddupontpwd', 'macdougall.jpg', 'dupont', 'dupond', 'dupont.dupond@free.fr', 0, '92.169.12.3'),
(4, 1, 'jacky35', 'hashedjackypwd', 'ridge.jpg', 'jacky', 'tuning', 'jacky.tuning@free.fr', 0, '92.169.12.4'),
(5, 1, 'hackerman', 'hashedhackermanpwd', 'brad.jpg', 'hacker', 'man', 'hacker.man@free.fr', 1, '92.169.12.51'),
(6, 1, 'kevinlekikou', 'hashedkevinlekikoupwd', 'madge.jpg', 'kevin', 'lekikou', 'kevin.lekikou@free.fr', 1, '92.169.12.5'),
(7, 2, 'admin', 'hashedadminpwd', 'brenda.jpg', 'beloved', 'admin', 'beloved.admin@free.fr', 0, '92.169.12.6');
Zohten's avatar
Zohten committed
22

Zohten's avatar
Zohten committed
23
INSERT INTO `MJ_GAME` (ID_GAME, PRIVATE, CREATION_TIME)
Zohten's avatar
Zohten committed
24
VALUES
Zohten's avatar
Zohten committed
25 26 27
(1, False, '2020/10/22 01:00:00'),
(2, False, '2019/10/22 01:00:00'),
(3, True, '2020/10/24 01:00:00'),
Zohten's avatar
Zohten committed
28
(4, False, '2019/10/24 01:00:00');
Zohten's avatar
Zohten committed
29

Zohten's avatar
Zohten committed
30
/* Ajouter un numéro de manche 
Zohten's avatar
Zohten committed
31 32
on update : cascade
BEGINING on update CURRENT_TIMESTAMP ça ne va pas*/
Zohten's avatar
Zohten committed
33 34 35 36
INSERT INTO `MJ_ROUND` (ID_ROUND ,ID_GAME ,PREVAILING_WIND ,SEED ,BEGINING ,ENDING ,ACTIONS)
VALUES
(1, 1, 1, 12345, '2020/10/22 01:10:00', '2020/10/22 01:12:00', 'a very long string describing actions of each players'),
(2, 1, 2, 54321, '2020/10/22 01:12:10', '2020/10/22 01:13:00', 'a very long string describing actions of each players'),
Zohten's avatar
Zohten committed
37 38
(3, 1, 2, 15243, '2020/10/22 01:12:10', NULL, 'a very long string describing actions of each players'),
(4, 2, 2, 15243, '2020/10/22 01:12:10', NULL, 'a very long string describing actions of each players');
Zohten's avatar
Zohten committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

/*Renomer WIND en USER_WIND*/
INSERT INTO `MJ_PLAY` (ID_USER, ID_ROUND, WIN, SCORE, HOST, WIND)
VALUES
(1, 1, True, 12000, True, 1),
(2, 1, False, 11000, False, 2),
(3, 1, False, 10000, False, 3),
(4, 1, False, 9000, False, 4),
(1, 2, True, 12000, True, 1),
(2, 2, False, 11000, False, 2),
(3, 2, False, 10000, False, 3),
(4, 2, False, 9000, False, 4),
(1, 3, NULL, 12000, True, 1),
(2, 3, NULL, 11000, False, 2),
(3, 3, NULL, 10000, False, 3),
Zohten's avatar
Zohten committed
54 55
(4, 3, NULL, 9000, False, 4),
(7, 4, NULL, 0, True, NULL);
Zohten's avatar
Zohten committed
56

Zohten's avatar
Zohten committed
57
/*INSERT INTO MJ_ROOM (ID_ROOM ,ID_USER ,PRIVATE ,DATE_BEGIN ,DATE_END)
Zohten's avatar
Zohten committed
58 59
VALUES
'2003/01/22 01:00:00'*/