1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-12 04:03:08 +00:00
redmine/project_inheritance/db/migrate/062_insert_builtin_roles.rb
Jean-Philippe Lang 2a2a31d148 Added project_inheritance work branch.
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1049 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-01-09 19:43:47 +00:00

16 lines
403 B
Ruby

class InsertBuiltinRoles < ActiveRecord::Migration
def self.up
nonmember = Role.new(:name => 'Non member', :position => 0)
nonmember.builtin = Role::BUILTIN_NON_MEMBER
nonmember.save
anonymous = Role.new(:name => 'Anonymous', :position => 0)
anonymous.builtin = Role::BUILTIN_ANONYMOUS
anonymous.save
end
def self.down
Role.destroy_all 'builtin <> 0'
end
end