fix: add goose migration for sessions table
All checks were successful
CI / Deploy / test (push) Successful in 13s
CI / Deploy / lint (push) Successful in 25s
CI / Deploy / deploy (push) Successful in 28s

The sqlite3store library expects the sessions table to exist but does
not create it. On fresh deployments, the session store would fail.
Uses IF NOT EXISTS to be safe on databases where the table was created
outside of goose.
This commit is contained in:
Ryan Hamamura
2026-03-02 15:00:07 -10:00
parent 021215ed94
commit 8c6e5d24ac

View File

@@ -0,0 +1,12 @@
-- +goose Up
CREATE TABLE IF NOT EXISTS sessions (
token TEXT PRIMARY KEY,
data BLOB NOT NULL,
expiry REAL NOT NULL
);
CREATE INDEX IF NOT EXISTS sessions_expiry_idx ON sessions(expiry);
-- +goose Down
DROP INDEX IF EXISTS sessions_expiry_idx;
DROP TABLE IF EXISTS sessions;