mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
feat(multiplayer): add shared allocation quota
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
-- Optional operator-configured regional spend guard. A missing row means
|
||||
-- unlimited, preserving existing deployments until they opt into a quota.
|
||||
CREATE TABLE allocation_quotas (
|
||||
region TEXT PRIMARY KEY CHECK (region IN ('EU', 'NA')),
|
||||
window_started_at TIMESTAMPTZ NOT NULL,
|
||||
window_seconds INTEGER NOT NULL CHECK (window_seconds > 0),
|
||||
used_allocations INTEGER NOT NULL DEFAULT 0 CHECK (used_allocations >= 0),
|
||||
max_allocations INTEGER NOT NULL CHECK (max_allocations > 0),
|
||||
updated_at TIMESTAMPTZ NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user