From 20fa0e10d1fbfb29750ee525f781caf1b9155d8d Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Sat, 16 Sep 2023 17:10:52 -0400 Subject: [PATCH] Fix schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PRIMARY KEY est toujours UNIQUE et NOT NULL, alors NOT NULL est redondant Assigner type VARCHAR(6) à presences.programme_id --- dbschema/dbschema.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbschema/dbschema.go b/dbschema/dbschema.go index e18b72d..b1c6030 100644 --- a/dbschema/dbschema.go +++ b/dbschema/dbschema.go @@ -3,9 +3,9 @@ package dbschema const Schema string = ` CREATE TABLE IF NOT EXISTS presences ( - id VARCHAR(7) PRIMARY KEY NOT NULL, + id VARCHAR(7) PRIMARY KEY, at TIMESTAMP NOT NULL, name VARCHAR(50) NOT NULL, - programme_id NOT NULL + programme_id VARCHAR(6) NOT NULL ); `