Keep every SQL statement out of the command layer so each feature can be built and tested without a Discord dependency.
8 lines
385 B
SQL
8 lines
385 B
SQL
-- Claim and close details of a ticket (M6-T05 / M6-T06)
|
|
ALTER TABLE tickets ADD COLUMN claimed_at TEXT;
|
|
ALTER TABLE tickets ADD COLUMN close_reason TEXT;
|
|
|
|
-- Faster lookups for the poll scheduler and the result rendering (M10)
|
|
CREATE INDEX IF NOT EXISTS idx_polls_due ON polls (status, ends_at);
|
|
CREATE INDEX IF NOT EXISTS idx_poll_votes_choice ON poll_votes (poll_id, choice_index);
|