diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/db.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/db.go b/src/db.go index 98a9305..fb71b80 100644 --- a/src/db.go +++ b/src/db.go @@ -148,7 +148,9 @@ func dbDeleteChallengeByUUID(uuid string) error { func dbCreateTableIfNotExist(db *sql.DB) error { log.Println("Creating a table in case it doesn't exist") - query := `CREATE TABLE public.challenges + query := `CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + +CREATE TABLE public.challenges ( uuid uuid NOT NULL DEFAULT uuid_generate_v4(), name character varying COLLATE pg_catalog."default" NOT NULL, |