Steuerkram/migrations/005_users.sql
fds2610 a338631dbd Session-basierte Authentifizierung + Benutzerverwaltung
- HTTP Basic Auth durch cookie-basierte Session-Auth ersetzt (24 h absolutes Timeout)
- Neue users-Tabelle (Migration 005) mit bcrypt-Passwort-Hashing
- Login-/Logout-Routen und eigenständiges Login-Template
- Ersteinrichtungsflow: erster Benutzer beim ersten Start direkt über /login anlegen
- Neuer Menüpunkt "Benutzer" (/useradmin) zum Anlegen, Deaktivieren und Löschen von Benutzern
- AUTH_USER/AUTH_PASS aus Konfiguration und docker-compose.yml entfernt
2026-03-25 15:28:07 +01:00

8 lines
412 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Migration 005: Session-basierte Authentifizierung – users-Tabelle
CREATE TABLE IF NOT EXISTS users (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(64) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
active TINYINT(1) NOT NULL DEFAULT 1,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;