From a4a320a6b6ca490797be93d211b68945a8904aaa Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Wed, 18 Dec 2013 18:55:23 -0500 Subject: [PATCH] election_tmp_tokens table should be created by schema.sql This table, which is essential to the election, was not listed in the schema.sql. This adds a CREATE TABLE command for it. --- vote/include/schema.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vote/include/schema.sql b/vote/include/schema.sql index 17d5dd9..d7bd397 100644 --- a/vote/include/schema.sql +++ b/vote/include/schema.sql @@ -59,3 +59,13 @@ CREATE TABLE `election_votes` ( `preference` int(11) NOT NULL default '0', PRIMARY KEY (`id`)); +/* Data in election_tmp_tokens only lives while the election is ongoing, and +** the PHP code deletes these entries when it records votes. +*/ + +DROP TABLE IF EXISTS `election_tmp_tokens`; +CREATE TABLE `election_tmp_tokens` ( + `election_id` int(11) NOT NULL default '0', + `election_voter_id` int(11) NOT NULL default '0', + `tmp_token` varchar(26) NOT NULL default ''); +