mirror of
https://github.com/redmine/redmine.git
synced 2024-08-27 05:58:46 +02:00
14 lines
469 B
Ruby
14 lines
469 B
Ruby
|
class AddProjectDefaultAssignedToId < ActiveRecord::Migration
|
||
|
def up
|
||
|
add_column :projects, :default_assigned_to_id, :integer, :default => nil
|
||
|
# Try to copy existing settings from the plugin if redmine_default_assign plugin was used
|
||
|
if column_exists?(:projects, :default_assignee_id, :integer)
|
||
|
Project.update_all('default_assigned_to_id = default_assignee_id')
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def down
|
||
|
remove_column :projects, :default_assigned_to_id
|
||
|
end
|
||
|
end
|