mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 09:45:28 +00:00
feat(db): zone edit locks and zone editors
Tables for the one account holding a zone's lock and for each zone's assigned editors, on MySQL and SQLite, with the interface and the test database. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
15
migrations/dlu/sqlite/90_zone_editing.sql
Normal file
15
migrations/dlu/sqlite/90_zone_editing.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Who may edit a zone's files (docs/ZonePublish.md): each zone's assigned editors, and the one account holding its
|
||||
-- lock. A lock has no expiry: its holder releases it, or an admin does.
|
||||
CREATE TABLE IF NOT EXISTS zone_edit_locks (
|
||||
zone_id INTEGER NOT NULL PRIMARY KEY,
|
||||
account_id INTEGER NOT NULL REFERENCES accounts(id),
|
||||
locked_at BIGINT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS zone_editors (
|
||||
zone_id INTEGER NOT NULL,
|
||||
account_id INTEGER NOT NULL REFERENCES accounts(id),
|
||||
assigned_by TEXT NOT NULL DEFAULT '',
|
||||
assigned_at BIGINT NOT NULL,
|
||||
PRIMARY KEY (zone_id, account_id)
|
||||
);
|
||||
Reference in New Issue
Block a user