From 10255b0ce570b2dee23bfc058d8d3bfdaf13d32d Mon Sep 17 00:00:00 2001 From: thaaoblues Date: Tue, 16 Jan 2024 18:38:02 +0100 Subject: [PATCH] mysql 5.7 ne supporte pas les DATE en default value :/ --- bdd.php | 1 - init_db.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bdd.php b/bdd.php index 25aa031..c2fbd14 100644 --- a/bdd.php +++ b/bdd.php @@ -6,7 +6,6 @@ include("test_creds.php"); $conn = new mysqli($servername, $username, $password,$dbname); -// /!\ A CHANGER EN PROD /!\ $uploadDir = 'archives/'; // le type de document est classifié entre 0 et n dans l'ensemble des entiers naturels diff --git a/init_db.php b/init_db.php index 1c58642..25e053f 100644 --- a/init_db.php +++ b/init_db.php @@ -22,7 +22,7 @@ $sql = " commentaire_auteur TEXT, valide BOOLEAN NOT NULL DEFAULT FALSE, corrige_inclu BOOLEAN NOT NULL DEFAULT FALSE, - date_televersement DATE NOT NULL DEFAULT CURRENT_DATE() + date_televersement DATETIME DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE IF NOT EXISTS documents (