mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
Add hunts table and default row; improve error handling and UI for team management
This commit is contained in:
1 parent
cd9c106ba1
commit
a6ed24b2e6
8 files changed
+156
-52
No files matched your search
@@ -44,6 +44,22 @@ CREATE TABLE game_settings (
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Execute this in your database:
|
||||
CREATE TABLE IF NOT EXISTS hunts (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
active BOOLEAN DEFAULT FALSE,
|
||||
start_time DATETIME DEFAULT NULL,
|
||||
end_time DATETIME DEFAULT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Insert a default hunt row if none exists:
|
||||
INSERT INTO hunts (active)
|
||||
SELECT FALSE
|
||||
WHERE NOT EXISTS (SELECT 1 FROM hunts LIMIT 1);
|
||||
|
||||
|
||||
|
||||
-- Insert initial admin user
|
||||
INSERT INTO users (username, password, role)
|
||||
VALUES ('admin', '$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy', 'admin');
|
||||
|
||||
Reference in new issue
Block a user