mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
pull moderator into own column, rename trust levels
This commit is contained in:
10
db/migrate/20130320024345_add_moderator_to_user.rb
Normal file
10
db/migrate/20130320024345_add_moderator_to_user.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class AddModeratorToUser < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :users, :moderator, :boolean, default: false
|
||||
execute "UPDATE users SET trust_level = 1, moderator = 't' where trust_level = 5"
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :users, :moderator
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user