Updater-Migration für Feature-Tabellen + README um neue Features erweitern
- updater/migrations/0001_feature_ui_tables.sql: legt voucher_templates und password_reset_tokens idempotent an (CREATE TABLE IF NOT EXISTS), damit bestehende Installationen die neuen Tabellen per System-Update erhalten - Updater-UI: Button "Ausstehende Migrationen ausführen" + run_migrations-Action (CSRF-geschützt) im Migrations-Tab - README: Features (Bulk, Templates, Dark Mode, i18n, Audit-Log, Passwort-Reset), zwei neue Screenshots (Bulk-Erstellung, Dashboard Dark Mode), Roadmap & Updater- Abschnitt aktualisiert
This commit is contained in:
parent
526c43e8ee
commit
51485810b4
6 changed files with 105 additions and 6 deletions
29
updater/migrations/0001_feature_ui_tables.sql
Normal file
29
updater/migrations/0001_feature_ui_tables.sql
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
-- Updater-Migration: Tabellen der UI/Feature-Erweiterung fuer bestehende
|
||||
-- Installationen nachziehen (Voucher-Templates + Password-Reset-Tokens).
|
||||
-- Idempotent (CREATE TABLE IF NOT EXISTS) – auf frischen Installationen, die
|
||||
-- database.sql bereits enthalten, ein No-Op.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `voucher_templates` (
|
||||
`id` INT PRIMARY KEY AUTO_INCREMENT,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`max_uses` INT NOT NULL DEFAULT 1,
|
||||
`expire_minutes` INT NOT NULL DEFAULT 480,
|
||||
`description` VARCHAR(500),
|
||||
`is_active` TINYINT(1) DEFAULT 1,
|
||||
`created_by` INT,
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (`created_by`) REFERENCES `users`(`id`) ON DELETE SET NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `password_reset_tokens` (
|
||||
`id` INT PRIMARY KEY AUTO_INCREMENT,
|
||||
`user_id` INT NOT NULL,
|
||||
`token` VARCHAR(128) NOT NULL,
|
||||
`expires_at` TIMESTAMP NOT NULL,
|
||||
`used` TINYINT(1) DEFAULT 0,
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE,
|
||||
UNIQUE KEY `unique_token` (`token`),
|
||||
INDEX `idx_expires` (`expires_at`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
Loading…
Add table
Add a link
Reference in a new issue