Add repository commands for handling votes
This commit is contained in:
parent
4b16f39b4d
commit
40331451ca
9 changed files with 647 additions and 4 deletions
8
db/migrations/001_create_votes.sql
Normal file
8
db/migrations/001_create_votes.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS votes (
|
||||
slug text not null,
|
||||
voter_id uuid not null,
|
||||
created_at timestamptz NOT NULL DEFAULT timezone('utc'::text, now()),
|
||||
primary key (slug, voter_id)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue