This commit is contained in:
2026-09-10 15:10:59 +02:00
parent 9016fb7baf
commit b8f9430827
8 changed files with 1339 additions and 8 deletions
+5 -4
View File
@@ -8,10 +8,11 @@ CREATE TABLE group_infos (
-- 2. Users — now with a direct group_id column
CREATE TABLE users (
user_id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(100) NOT NULL UNIQUE,
email VARCHAR(255) NOT NULL UNIQUE,
group_id INT NULL, -- nullable if a user can exist with no group yet
user_id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(100) NOT NULL UNIQUE,
email VARCHAR(255) NOT NULL,
display_name VARCHAR(255) NULL,
group_id INT NULL, -- nullable if a user can exist with no group yet
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (group_id) REFERENCES group_infos(group_id) ON DELETE SET NULL
);
View File