modifié : SRC/init/table.sql

This commit is contained in:
sidya82 2015-02-12 19:19:25 +01:00
parent 0d7e4b4516
commit 0480d71aec

View File

@ -1,18 +1,20 @@
DROP TABLE IF EXISTS referent; DROP TABLE IF EXISTS description;
DROP TABLE IF EXISTS asscocielisteaoeuvre;
DROP TABLE IF EXISTS asscocielisteajeu;
DROP TABLE IF EXISTS listeoeuvre; DROP TABLE IF EXISTS listeoeuvre;
DROP TABLE IF EXISTS oeuvre; DROP TABLE IF EXISTS oeuvre;
DROP TABLE IF EXISTS asscocie;
DROP TABLE IF EXISTS description;
DROP TABLE IF EXISTS auteur; DROP TABLE IF EXISTS auteur;
DROP TABLE IF EXISTS designation; DROP TABLE IF EXISTS designation;
DROP TABLE IF EXISTS technique; DROP TABLE IF EXISTS technique;
DROP TABLE IF EXISTS domaine; DROP TABLE IF EXISTS domaine;
DROP TABLE IF EXISTS matiere; DROP TABLE IF EXISTS matiere;
DROP TABLE IF EXISTS datation; DROP TABLE IF EXISTS datation;
DROP TABLE IF EXISTS referent;
DROP TABLE IF EXISTS niveau; DROP TABLE IF EXISTS niveau;
DROP TABLE IF EXISTS jeu; DROP TABLE IF EXISTS jeu;
CREATE TABLE jeu ( CREATE TABLE jeu (
idjeu INT NOT NULL AUTO_INCREMENT, idjeu INT NOT NULL AUTO_INCREMENT,
nom VARCHAR(50), nom VARCHAR(50),
@ -106,7 +108,7 @@ CREATE TABLE listeoeuvre (
etat INT(1) DEFAULT 0, etat INT(1) DEFAULT 0,
dateCreation TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dateCreation TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (idlisteoeuvre), PRIMARY KEY (idlisteoeuvre),
FOREIGN KEY (idreferent) REFERENCES referent(idreferent), FOREIGN KEY (idreferent) REFERENCES referent(idreferent)
); );
@ -121,7 +123,7 @@ CREATE TABLE asscocielisteaoeuvre (
CREATE TABLE asscocielisteajeu ( CREATE TABLE asscocielisteajeu (
idlisteoeuvre INT NOT NULL, idlisteoeuvre INT NOT NULL,
idjeu INT NOT NULL, idjeu INT NOT NULL,
PRIMARY KEY (idlisteoeuvre,idoeuvre), PRIMARY KEY (idlisteoeuvre,idjeu),
FOREIGN KEY (idlisteoeuvre) REFERENCES listeoeuvre(idlisteoeuvre), FOREIGN KEY (idlisteoeuvre) REFERENCES listeoeuvre(idlisteoeuvre),
FOREIGN KEY (idjeu) REFERENCES jeu(idjeu) FOREIGN KEY (idjeu) REFERENCES jeu(idjeu)
); );