OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/db/migrate/20131001132542_rename_issue...

20 lines
604 B

class RenameIssueStatusToStatus < ActiveRecord::Migration
def initialize
super
@issue_done_statuses_for_project_exists
= ActiveRecord::Base.connection.tables.include? 'issue_done_statuses_for_project'
end
def change
if @issue_done_statuses_for_project_exists
rename_table :issue_done_statuses_for_project, :done_statuses_for_project
rename_column :done_statuses_for_project, :issue_status_id, :status_id
else
create_table :done_statuses_for_project, :id => false do |t|
t.references :project
t.references :status
end
end
end
end