Skip to content

Commit

Permalink
Fix incorrect migration SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalexling committed Jan 17, 2021
1 parent b471ed2 commit bd81c2e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions migration/titles.5.cr
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ class CreateTitles < MG::Base
def down : String
<<-SQL
-- insert the is_title column
ALTER TABLE ids ADD COLUMN is_title INTEGER NOT NULL;
-- set is_title for all rows to 0
UPDATE ids SET column = 0;
ALTER TABLE ids ADD COLUMN is_title INTEGER NOT NULL DEFAULT 0;
-- migrate data from titles to ids
INSERT INTO ids
Expand Down

0 comments on commit bd81c2e

Please sign in to comment.