add PGlite user_votes table for local vote caching

This commit is contained in:
2026-03-10 16:51:43 +01:00
parent d6ff129af4
commit 8422e49e78
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS user_votes (
legislation_id INTEGER NOT NULL,
vote TEXT NOT NULL CHECK (vote IN ('ja', 'nein', 'enthaltung')),
voted_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (legislation_id)
);

View File

@@ -1,3 +1,4 @@
import init from "./001_init.sql?raw"
import userVotes from "./002_user_votes.sql?raw"
export const migrations: string[] = [init]
export const migrations: string[] = [init, userVotes]