mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Fix incorrect migration SQL
This commit is contained in:
parent
b471ed2fa0
commit
bd81c2e005
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user