Commit 86a384c3 authored by Zohten's avatar Zohten

database updated

parent 1acd782b
/*==============================================================*/
/* Nom de SGBD : MySQL 5.0 */
/* Date de cration : 24/11/2020 16:14:35 */
/* Date de cration : 24/11/2020 16:14:35 */
/*==============================================================*/
......@@ -86,8 +86,8 @@ create table MJ_PLAY
WIND int comment '',
primary key (ID_USER, ID_ROUND),
constraint FK_MJ_PLAY_PLAY2_MJ_USER foreign key (ID_USER)
references MJ_USER (ID_USER) on delete restrict on update restrict,
references MJ_USER (ID_USER) on delete restrict on update cascade,
constraint FK_MJ_PLAY_MJ_PLAY_MJ_ROUND foreign key (ID_ROUND)
references MJ_ROUND (ID_ROUND) on delete restrict on update restrict
references MJ_ROUND (ID_ROUND) on delete restrict on update cascade
);
......@@ -25,6 +25,30 @@ VALUES
(3, False, '2020/10/24 01:00:00'),
(4, False, '2019/10/24 01:00:00');
/* Ajouter un numéro de manche
on update : cascade*/
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'),
(3, 1, 2, 15243, '2020/10/22 01:12:10', NULL, 'a very long string describing actions of each players');
/*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),
(4, 3, NULL, 9000, False, 4);
/*INSERT INTO MJ_ROOM (ID_ROOM ,ID_USER ,PRIVATE ,DATE_BEGIN ,DATE_END)
VALUES
'2003/01/22 01:00:00'*/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment