MOD #138 : Stockage des passwords hashés
[cl7.git] / php / update_db.php
index be2c041..a2d9ffe 100644 (file)
@@ -34,13 +34,14 @@ function creer_db()
         UNIQUE (nom)
       );
    ");
+   // participants.password est un hash calculé à l'aide de sha1().
    pg_query("
       CREATE TABLE participants (
         id int NOT NULL,
         pseudo varchar(50) DEFAULT NULL,
         clan_nom varchar(30) DEFAULT NULL,
         clan_tag varchar(10) DEFAULT NULL,
-        password varchar(10) DEFAULT NULL,
+        password char(40) DEFAULT NULL,
         nom varchar(30) DEFAULT NULL,
         prenom varchar(30) DEFAULT NULL,
         age varchar(30) DEFAULT NULL,