User Profile sind nun verfügbar

This commit is contained in:
kai
2026-08-25 14:39:47 +02:00
parent 714194615f
commit 72ff659ac4
6 changed files with 291 additions and 4 deletions
+8
View File
@@ -4,6 +4,7 @@ CREATE TABLE users (
email VARCHAR(255) NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
display_name VARCHAR(100),
avatar_path TEXT,
is_admin BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
@@ -79,6 +80,13 @@ CREATE TABLE concert_attendance (
PRIMARY KEY (concert_id, user_id)
);
CREATE TABLE user_badges (
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
badge_code VARCHAR(50) NOT NULL,
awarded_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (user_id, badge_code)
);
CREATE INDEX idx_concerts_start_datetime
ON concerts(start_datetime);