BUGFIX: orphan badge groupings

This commit is contained in:
Sam
2014-07-18 15:55:42 +10:00
parent c8284170ad
commit 4feedecce4
3 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
class SetDefaultBadgeGrouping < ActiveRecord::Migration
def change
execute 'UPDATE badges SET badge_grouping_id = 5 WHERE badge_grouping_id IS NULL'
change_column :badges, :badge_grouping_id, :integer, null: false, default: 5
end
end