mirror of
https://github.com/redmine/redmine.git
synced 2024-08-18 14:10:15 +02:00
![Jean-Philippe Lang](/assets/img/avatar_default.png)
git-svn-id: http://svn.redmine.org/redmine/trunk@13417 e93f8b46-1217-0410-a6f0-8f06a7374b81
22 lines
488 B
Ruby
22 lines
488 B
Ruby
class InsertBuiltinGroups < ActiveRecord::Migration
|
|
def up
|
|
Group.reset_column_information
|
|
|
|
unless GroupAnonymous.any?
|
|
g = GroupAnonymous.new(:lastname => 'Anonymous users')
|
|
g.status = 1
|
|
g.save :validate => false
|
|
end
|
|
unless GroupNonMember.any?
|
|
g = GroupNonMember.new(:lastname => 'Non member users')
|
|
g.status = 1
|
|
g.save :validate => false
|
|
end
|
|
end
|
|
|
|
def down
|
|
GroupAnonymous.delete_all
|
|
GroupNonMember.delete_all
|
|
end
|
|
end
|