add PGlite user_votes table for local vote caching
This commit is contained in:
6
src/client/shared/db/migrations/002_user_votes.sql
Normal file
6
src/client/shared/db/migrations/002_user_votes.sql
Normal 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)
|
||||||
|
);
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
import init from "./001_init.sql?raw"
|
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]
|
||||||
|
|||||||
Reference in New Issue
Block a user