Fix incorrect migration SQL

This commit is contained in:
Alex Ling 2021-01-17 15:58:13 +00:00
parent b471ed2fa0
commit bd81c2e005

View File

@ -42,10 +42,7 @@ class CreateTitles < MG::Base
def down : String def down : String
<<-SQL <<-SQL
-- insert the is_title column -- insert the is_title column
ALTER TABLE ids ADD COLUMN is_title INTEGER NOT NULL; ALTER TABLE ids ADD COLUMN is_title INTEGER NOT NULL DEFAULT 0;
-- set is_title for all rows to 0
UPDATE ids SET column = 0;
-- migrate data from titles to ids -- migrate data from titles to ids
INSERT INTO ids INSERT INTO ids