mirror of
https://github.com/hkalexling/Mango.git
synced 2026-01-25 00:00:36 -05:00
Fix incorrect migration SQL
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user