2007-08-29 20:52:35 +04:00
|
|
|
class InsertBuiltinRoles < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
nonmember = Role.new(:name => 'Non member', :position => 0)
|
|
|
|
nonmember.builtin = Role::BUILTIN_NON_MEMBER
|
|
|
|
nonmember.save
|
2011-11-08 09:10:41 +04:00
|
|
|
|
2007-08-29 20:52:35 +04:00
|
|
|
anonymous = Role.new(:name => 'Anonymous', :position => 0)
|
|
|
|
anonymous.builtin = Role::BUILTIN_ANONYMOUS
|
2011-11-08 09:10:41 +04:00
|
|
|
anonymous.save
|
2007-08-29 20:52:35 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
Role.destroy_all 'builtin <> 0'
|
|
|
|
end
|
|
|
|
end
|