Commit 2b9f6878 by Olivier Perez

Fixes #122 use the right method to use table names

parent 2fd5b3e1
......@@ -52,13 +52,13 @@ class RPadVotes_from_0_8 implements Migration {
}
private function rpadVotes($pdo) {
$pdo->exec('UPDATE fd_vote fv
$pdo->exec('UPDATE '. Utils::table('vote') .' fv
INNER JOIN (
SELECT v.id, RPAD(v.choices, inn.slots_count, \'0\') new_choices
FROM fd_vote v
FROM '. Utils::table('vote') .' v
INNER JOIN
(SELECT s.poll_id, SUM(IFNULL(LENGTH(s.moments) - LENGTH(REPLACE(s.moments, \',\', \'\')) + 1, 1)) slots_count
FROM fd_slot s
FROM '. Utils::table('slot') .' s
GROUP BY s.poll_id
ORDER BY s.poll_id) inn ON inn.poll_id = v.poll_id
WHERE LENGTH(v.choices) != inn.slots_count
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment