Claude-assisted improvements (untested)

- dev auth flow (side-step OAuth)
- db event processing integration tests
- dev scripts (eg Makefile)
- db / test db migration setup scripts.
This commit is contained in:
2026-08-19 23:20:15 -06:00
parent 82efe19ae0
commit 4e77052a37
35 changed files with 1242 additions and 144 deletions
@@ -1,6 +1,6 @@
CREATE TABLE oauth_login_states (
state BYTEA NOT NULL,
expiration TIMESTAMPTZ NOT NULL DEFAULT (NOW() + 10 'minute'),
expiration TIMESTAMPTZ NOT NULL DEFAULT (NOW() + '10 minutes'::interval),
PRIMARY KEY (state)
);
@@ -0,0 +1,14 @@
BEGIN;
ALTER TABLE oauth_tokens
ALTER COLUMN id_token_custom_claims_updated_at
TYPE TEXT
USING id_token_custom_claims_updated_at::TEXT;
ALTER TABLE oauth_tokens
ADD COLUMN claims JSONB NOT NULL DEFAULT '{}'::jsonb;
ALTER TABLE oauth_tokens
ALTER COLUMN claims DROP DEFAULT;
COMMIT;
@@ -0,0 +1,16 @@
BEGIN;
-- Reconciles oauth_tokens with the schema the application code actually
-- expects. Neither of these two changes was ever committed as a migration
-- despite being applied by hand at some point - see the "claims" column
-- below, which no application code reads or writes.
ALTER TABLE oauth_tokens
DROP COLUMN claims;
ALTER TABLE oauth_tokens
ALTER COLUMN id_token_custom_claims_updated_at
TYPE TIMESTAMPTZ
USING id_token_custom_claims_updated_at::TIMESTAMPTZ;
COMMIT;