rajout titre et image sur les quiz
continuous-integration/drone/push Build is passing Details

master
Kentin BRONGNIART 3 months ago
parent d5d87951e6
commit 7d208dce6c

@ -502,18 +502,11 @@ VALUES
('Here is looking at you, kid.', 'Casablanca', 'Gone with the Wind', 'Citizen Kane', 'The Maltese Falcon', 'Casablanca'); ('Here is looking at you, kid.', 'Casablanca', 'Gone with the Wind', 'Citizen Kane', 'The Maltese Falcon', 'Casablanca');
-- INSERTION TABLE Quiz -- INSERTION TABLE Quiz
INSERT INTO Quiz (nb_quest) INSERT INTO Quiz (title,img,nb_quest)
VALUES VALUES
(10), ("Titre du quiz n°1",56,4),
(10), ("Titre du quiz n°1",100,5);
(10),
(10),
(10),
(10),
(10),
(10),
(10),
(10);
-- INSERTION TABLE Quiz_Question -- INSERTION TABLE Quiz_Question
@ -522,13 +515,12 @@ VALUES
(1, 1), -- Quiz 1, Question 1 (1, 1), -- Quiz 1, Question 1
(1, 2), -- Quiz 1, Question 2 (1, 2), -- Quiz 1, Question 2
(1, 3), -- Quiz 1, Question 3 (1, 3), -- Quiz 1, Question 3
(2, 1), -- Quiz 2, Question 1 (1, 4), -- Quiz 1, Question 4
(2, 4), -- Quiz 2, Question 4 (2, 5), -- Quiz 2, Question 5
(3, 2), -- Quiz 3, Question 2 (2, 6), -- Quiz 2, Question 6
(3, 5), -- Quiz 3, Question 5 (2, 7), -- Quiz 2, Question 7
(4, 6), -- Quiz 4, Question 6 (2, 8), -- Quiz 2, Question 8
(5, 3), -- Quiz 5, Question 3 (2, 9), -- Quiz 2, Question 9
(5, 7); -- Quiz 5, Question 7
INSERT INTO DailyQuote (citation_id) INSERT INTO DailyQuote (citation_id)

@ -48,8 +48,11 @@ CREATE TABLE Question(
); );
CREATE TABLE Quiz( CREATE TABLE Quiz(
id_quiz SERIAL PRIMARY KEY, id_quiz SERIAL PRIMARY KEY,
nb_quest numeric title varchar(40) NOT NULL,
img NUMERIC NOT NULL,
nb_quest numeric,
CONSTRAINT fk_img FOREIGN KEY(img) REFERENCES Image(id_img)
); );
CREATE TABLE Quiz_Question( CREATE TABLE Quiz_Question(

Loading…
Cancel
Save