mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch: accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
1.6 KiB
SQL
19 lines
1.6 KiB
SQL
/* scheduled_events name, mode, schedule, priority and parts, and the calendar and vanity events moved into them: see
|
|
the MySQL migration. */
|
|
ALTER TABLE scheduled_events ADD COLUMN name TEXT NOT NULL DEFAULT '';
|
|
ALTER TABLE scheduled_events ADD COLUMN mode INTEGER NOT NULL DEFAULT 1;
|
|
ALTER TABLE scheduled_events ADD COLUMN schedule TEXT NOT NULL DEFAULT '';
|
|
ALTER TABLE scheduled_events ADD COLUMN priority INTEGER NOT NULL DEFAULT 0;
|
|
ALTER TABLE scheduled_events ADD COLUMN parts TEXT NOT NULL DEFAULT '';
|
|
UPDATE scheduled_events SET name = feature, mode = CASE WHEN state = 3 THEN 0 ELSE 1 END,
|
|
parts = json_array(json_object('kind', 'feature', 'config', json_object('feature', feature), 'applied', json(CASE WHEN state = 1 THEN 'true' ELSE 'false' END),
|
|
'state', json_object('slot', slot, 'previousValue', previous_value, 'previousWebWins', json(CASE WHEN previous_web_wins <> 0 THEN 'true' ELSE 'false' END)), 'status', status))
|
|
WHERE parts = '' AND feature <> '';
|
|
INSERT INTO scheduled_events (feature, name, note, mode, schedule, starts_at, ends_at, priority, parts, state, status, created_at, created_by, updated_at, updated_by)
|
|
SELECT '', name, note, mode, schedule, 0, 0, priority,
|
|
json_array(json_object('kind', 'vanity', 'config', json_object('file', file, 'removals', removals,
|
|
'fileSwitches', CASE WHEN file_switches = '' THEN json_object() ELSE json(file_switches) END),
|
|
'applied', json(CASE WHEN applied <> 0 THEN 'true' ELSE 'false' END), 'state', json_object(), 'status', '')),
|
|
CASE WHEN applied <> 0 THEN 1 ELSE 0 END, '', created_at, created_by, updated_at, updated_by
|
|
FROM vanity_events;
|