mysql 5.7 ne supporte pas les DATE en default value :/

This commit is contained in:
thaaoblues 2024-01-16 18:38:02 +01:00
parent 9c8a3ec8f0
commit 10255b0ce5
2 changed files with 1 additions and 2 deletions

View file

@ -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

View file

@ -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 (