From fa3ec7692e3777472c2a2df00c24db09b2f7c906 Mon Sep 17 00:00:00 2001 From: visoulier Date: Fri, 29 Mar 2024 13:26:32 +0100 Subject: [PATCH] fix get id pour partie --- SpringBootProject/src/main/resources/schema.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SpringBootProject/src/main/resources/schema.sql b/SpringBootProject/src/main/resources/schema.sql index bbb4185..1de4105 100644 --- a/SpringBootProject/src/main/resources/schema.sql +++ b/SpringBootProject/src/main/resources/schema.sql @@ -117,7 +117,7 @@ CREATE TABLE Partie( id SERIAL PRIMARY KEY, codeInvitation varchar(5) UNIQUE DEFAULT make_uid(), idJeu integer REFERENCES Jeu(id), - idDifficulte integer REFERENCES Difficulte(id), + idDifficulte integer REFERENCES Difficulte(id) NOT NULL, status varchar(128), dateCreation timestamp DEFAULT CURRENT_TIMESTAMP ); @@ -244,7 +244,8 @@ VALUES -- Partie -INSERT INTO Partie(codeInvitation, idJeu) VALUES ('abcde', 1); +INSERT INTO Partie(codeInvitation, idJeu, idDifficulte) VALUES ('abcde', 1, 2); +INSERT INTO PartieKahoot(idPartie) VALUES (1); -- Utilisateurs INSERT INTO Joueur(pseudo, idPartie) VALUES ('moi, le meilleur joueur du monde', 1); --id = 1