fix(backend): solve 500 errors with auto-migrations and standardized filenames

This commit is contained in:
Michael committed 2026-02-04 16:32:28 +01:00
1 parent 8ed1782de6
commit 502b76c5d6
6 files changed
+83 -36

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
-- Add role column to users table
ALTER TABLE users ADD COLUMN role VARCHAR(20) NOT NULL DEFAULT 'user';
-- Set first user as admin (if any)
UPDATE users SET role = 'admin' WHERE id = (SELECT id FROM users ORDER BY created_at ASC LIMIT 1);