comparison db/migrate/062_insert_builtin_roles.rb @ 912:5e80956cc792 cannam_integration

Merge from branch "redmine-1.3"
author Chris Cannam
date Mon, 27 Feb 2012 13:53:18 +0000
parents cbb26bc654de
children 433d4f72a19b
comparison
equal deleted inserted replaced
911:487d96eac004 912:5e80956cc792
1 class InsertBuiltinRoles < ActiveRecord::Migration 1 class InsertBuiltinRoles < ActiveRecord::Migration
2 def self.up 2 def self.up
3 nonmember = Role.new(:name => 'Non member', :position => 0) 3 nonmember = Role.new(:name => 'Non member', :position => 0)
4 nonmember.builtin = Role::BUILTIN_NON_MEMBER 4 nonmember.builtin = Role::BUILTIN_NON_MEMBER
5 nonmember.save 5 nonmember.save
6 6
7 anonymous = Role.new(:name => 'Anonymous', :position => 0) 7 anonymous = Role.new(:name => 'Anonymous', :position => 0)
8 anonymous.builtin = Role::BUILTIN_ANONYMOUS 8 anonymous.builtin = Role::BUILTIN_ANONYMOUS
9 anonymous.save 9 anonymous.save
10 end 10 end
11 11
12 def self.down 12 def self.down
13 Role.destroy_all 'builtin <> 0' 13 Role.destroy_all 'builtin <> 0'
14 end 14 end