Each election should only have one set of results; use UNIQUE to enforce.

This commit is contained in:
Bradley M. Kuhn 2014-02-10 18:32:23 -05:00
parent 54d0a4b5cb
commit 045b85b1ae

View file

@ -29,7 +29,7 @@ DROP TABLE IF EXISTS `election_choices`;
DROP TABLE IF EXISTS `election_results`; DROP TABLE IF EXISTS `election_results`;
CREATE TABLE `election_results` ( CREATE TABLE `election_results` (
`election_id` int(11) NOT NULL default '0', `election_id` int(11) NOT NULL UNIQUE default '0',
`result` text `result` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;