From 69b0138f384a106771b17c8042c53532790a0dc4 Mon Sep 17 00:00:00 2001 From: Bonnet Ronan Date: Wed, 7 Dec 2022 09:03:13 +0100 Subject: [PATCH] fix syntax errors --- personnel.sql | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/personnel.sql b/personnel.sql index 00b193c..c6a0b57 100644 --- a/personnel.sql +++ b/personnel.sql @@ -1,3 +1,19 @@ +-- Nathan +CREATE TYPE echelon AS ENUM ( + 'A*', + 'A', + 'B', + 'C' +); + +-- Nathan +CREATE TYPE grade AS ENUM ( + 'cr1', + 'cr2', + 'mcf', + 'mcf hors classe' +); + -- Axel CREATE TABLE Personnel ( @@ -6,14 +22,14 @@ CREATE TABLE Personnel prenom VARCHAR, date_de_naissance DATE, adress VARCHAR, - date_de_recrutement DATE, + date_de_recrutement DATE ); --Axel CREATE TABLE Doctorant( idDoctorant INT NOT NULL, date_debut_these DATE, - date_soutenance DATE + date_soutenance DATE, FOREIGN KEY (idDoctorant) REFERENCES Personnel(idPersonnel), PRIMARY KEY(idPersonnel) ); @@ -36,21 +52,6 @@ CREATE TABLE Enseignant_Chercheur( PRIMARY KEY (idEnseignant) ); --- Nathan -CREATE TYPE echelon AS ENUM ( - 'A*', - 'A', - 'B', - 'C' -); - --- Nathan -CREATE TYPE grade AS ENUM ( - 'cr1', - 'cr2', - 'mcf', - 'mcf hors classe' -); -- Nathan CREATE TABLE Evenement( @@ -91,7 +92,7 @@ CREATE TABLE Auteur_Externe ( prenom VARCHAR, adresseMail VARCHAR, idLabo INT NOT NULL, - FOREIGN KEY (idLabo) REFERENCES LaboExterne(idLabo), + FOREIGN KEY (idLabo) REFERENCES Labo_Externe(idLabo), PRIMARY KEY (idAuteur) ); @@ -164,7 +165,7 @@ CREATE TABLE Participe_Externe( -- Ronan CREATE TABLE Organise ( idPortesOuverte INT NOT NULL, - idPersonnel INT NOT NULL,s d + idPersonnel INT NOT NULL, FOREIGN KEY (idPortesOuverte) REFERENCES Journee_Portes_Ouvertes(idPorte_Ouverte), FOREIGN KEY (idPersonnel) REFERENCES Personnel(idPersonnel), PRIMARY KEY(idPortesOuverte, idPersonnel)