mirror of
https://github.com/redmine/redmine.git
synced 2024-08-01 08:18:13 +02:00
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
|