[dw-free] large polls not recording votes beyond ~87 votes
[commit: http://hg.dwscoalition.org/dw-free/rev/0f6b36e4965d]
http://bugs.dwscoalition.org/show_bug.cgi?id=3916
Increase field size so it can actually contain the results of 255
radioboxes.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3916
Increase field size so it can actually contain the results of 255
radioboxes.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/update-db-general.pl
-------------------------------------------------------------------------------- diff -r e6e054bc4933 -r 0f6b36e4965d bin/upgrading/update-db-general.pl --- a/bin/upgrading/update-db-general.pl Tue Sep 20 20:32:42 2011 +0800 +++ b/bin/upgrading/update-db-general.pl Thu Sep 22 12:15:22 2011 +0800 @@ -1167,9 +1167,9 @@ CREATE TABLE s2categories ( s2lid INT UNSIGNED NOT NULL, kwid INT(10) UNSIGNED NOT NULL, - active TINYINT(1) UNSIGNED NOT NULL DEFAULT 1, - - PRIMARY KEY (s2lid, kwid) + active TINYINT(1) UNSIGNED NOT NULL DEFAULT 1, + + PRIMARY KEY (s2lid, kwid) ) EOC @@ -2454,7 +2454,7 @@ pollid INT UNSIGNED NOT NULL, pollqid TINYINT UNSIGNED NOT NULL, userid INT UNSIGNED NOT NULL, - value VARCHAR(255) DEFAULT NULL, + value VARCHAR(1024) DEFAULT NULL, PRIMARY KEY (journalid,pollid,pollqid), KEY (userid,pollid) @@ -3105,7 +3105,7 @@ fromuser CHAR(25), touser CHAR(25), rendate INT UNSIGNED, - + INDEX (ownerid) ) EOC @@ -4014,6 +4014,12 @@ set_dbnote( "fix_redirect_edges", 1 ); } + # accommodate more poll answers by widening value + if ( column_type("pollresult2", "value") eq "varchar(255)" ) { + do_alter("pollresult2", + "ALTER TABLE pollresult2 " . + "MODIFY COLUMN value VARCHAR(1024) DEFAULT NULL"); + } }); --------------------------------------------------------------------------------
no subject