weavesignal/crates/model/migrations/0010_pass_ended.sql
The WeaveSignal contributors 466b32ab6a WeaveSignal 1.0.0 — release one
The first public release. What it does: https://weavesignal.top; what changed: CHANGELOG.md.
2026-11-04 12:15:42 +00:00

12 lines
648 B
SQL

-- SPDX-License-Identifier: AGPL-3.0-only
-- Passes the studio has ended (ADR-0119, reopening ADR-0108): a pass issued at or before
-- `ended_at` for this identity buys no more room tokens, across a restart of the control
-- plane. A row matters only while such a pass could still live (24 h at most), so rows older
-- than a day are deleted as new ones are written and at start; nothing else is kept.
CREATE TABLE pass_ended (
station_id uuid NOT NULL REFERENCES station (id),
identity text NOT NULL CHECK (length(identity) BETWEEN 1 AND 64),
ended_at timestamptz NOT NULL,
PRIMARY KEY (station_id, identity)
);