You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cacert-boardvoting/boardvoting/migrations/20170421143052_fix_duplicat...

15 lines
453 B
SQL

-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
-- Peter Yuill has a duplicate entry in the voters table he has ids 17 and 31
UPDATE votes SET voter=17 WHERE voter=31;
UPDATE decisions SET proponent=17 WHERE proponent=31;
DELETE FROM emails WHERE voter=31;
DELETE FROM voters WHERE id=31;
-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back
-- There is no useful backward migration