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
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)
);