From 1e336ff6e808aed1cbace1fd13f6857d45447ef6 Mon Sep 17 00:00:00 2001
From: Tristan Riehs <tristan.riehs@inria.fr>
Date: Sun, 16 Nov 2025 10:04:03 +0100
Subject: Add every "NOT NULL" needed int SQL init script

---
 sql/init.sql | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'sql/init.sql')

diff --git a/sql/init.sql b/sql/init.sql
index 259a591..11aa59e 100644
--- a/sql/init.sql
+++ b/sql/init.sql
@@ -1,20 +1,20 @@
 CREATE TABLE tags (
        id integer NOT NULL PRIMARY KEY,
-       name varchar(255),
+       name varchar(255) NOT NULL,
        description text
 );
 
 CREATE TABLE files (
        id integer NOT NULL PRIMARY KEY,
-       canonical_name varchar(255),
-       full_name varchar(255),
+       canonical_name varchar(255) NOT NULL,
+       full_name varchar(255) NOT NULL,
        description text,
-       date varchar(255)
+       date varchar(255) NOT NULL
 );
 
 CREATE TABLE file_tags (
-       file integer,
-       tag integer,
+       file integer NOT NULL,
+       tag integer NOT NULL,
        FOREIGN KEY(file) REFERENCES files(id),
        FOREIGN KEY(tag)  REFERENCES tags(id)
 );
-- 
cgit v1.2.3

