From c4a24fa7b2f01e68b6016e5b654301194a6078b3 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Sun, 15 Feb 2015 05:25:36 +0100 Subject: [PATCH] modified: SRC/init/table.sql --- SRC/init/table.sql | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/SRC/init/table.sql b/SRC/init/table.sql index 54ce77f..a2aead1 100644 --- a/SRC/init/table.sql +++ b/SRC/init/table.sql @@ -12,7 +12,7 @@ DROP TABLE IF EXISTS technique; DROP TABLE IF EXISTS domaine; DROP TABLE IF EXISTS matiere; DROP TABLE IF EXISTS datation; -DROP TABLE IF EXISTS referent; +DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS niveau; DROP TABLE IF EXISTS jeu; @@ -35,12 +35,13 @@ CREATE TABLE niveau ( FOREIGN KEY (idjeu) REFERENCES jeu(idjeu) ); -CREATE TABLE referent ( - idreferent INT NOT NULL AUTO_INCREMENT, - nom VARCHAR(50), - mdp VARCHAR(32), +CREATE TABLE users ( + idusers INT NOT NULL AUTO_INCREMENT, + name VARCHAR(50), + password VARCHAR(255), email VARCHAR(50), image VARCHAR(255), + admin INT(1) DEFAULT 0, PRIMARY KEY (idreferent) ); @@ -121,7 +122,7 @@ CREATE TABLE listeoeuvre ( etat INT(1) DEFAULT 0, dateCreation TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (idlisteoeuvre), - FOREIGN KEY (idreferent) REFERENCES referent(idreferent) + FOREIGN KEY (idreferent) REFERENCES users(idreferent) );