cacert-boardvoting/boardvoting/migrations/20170421143052_fix_duplicates.sql
Jan Dittberner 4dd5e09820 Embed database migrations
- switch from goose to github.com/rubenv/sql-migrate
- move assets (static, templates, migrations) to boardvoting package
- add generated boardvoting/assets.go
- remove unused static files from static directory
- add package db with db migration configuration
2018-03-29 20:08:41 +02:00

15 lines
No EOL
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