discourse/db/migrate/20170818191909_split_alias_levels.rb

9 lines
258 B
Ruby
Raw Normal View History

class SplitAliasLevels < ActiveRecord::Migration
def change
rename_column :groups, :alias_level, :mentionable_level
add_column :groups, :messageable_level, :integer, default: 0
Group.update_all('messageable_level=mentionable_level')
end
end