X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/f7aee769411a893c1059c529a220c0d25c72974f..4efa3e9bc47cc649205a399fde51ed7e61bef7f8:/db/create.sql

diff --git a/db/create.sql b/db/create.sql
index 0b9b74e..4a2025f 100644
--- a/db/create.sql
+++ b/db/create.sql
@@ -24,7 +24,9 @@ create table elections (
  anonymous tinyint NOT NULL DEFAULT 0, 
  startdate datetime NOT NULL, 
  enddate datetime, 
- primary key (id)
+ user_id int NOT NULL,
+ primary key (id),
+ constraint fk_user_election foreign key (user_id) references users(id)
 );
 
 # CREATE candidates TABLE
@@ -35,6 +37,7 @@ create table candidates (
  id int NOT NULL auto_increment,
  election_id int NOT NULL,
  name varchar(100) NOT NULL, 
+ description text NULL,
  picture blob NOT NULL, 
  primary key (id)
 );
