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/20131009083648_work_package...

40 lines
1.1 KiB

class WorkPackageIndices < ActiveRecord::Migration
def up
# drop obsolete fields
remove_column :work_packages, :planning_element_status_comment
remove_column :work_packages, :planning_element_status_id
remove_column :work_packages, :sti_type
add_index :work_packages, :type_id
add_index :work_packages, :status_id
add_index :work_packages, :category_id
add_index :work_packages, :author_id
add_index :work_packages, :assigned_to_id
add_index :work_packages, :created_at
add_index :work_packages, :fixed_version_id
end
def down
add_column :work_packages, :planning_element_status_comment, :string
add_column :work_packages, :planning_element_status_id, :integer
add_column :work_packages, :sti_type, :string
remove_index :work_packages, :type_id
remove_index :work_packages, :status_id
remove_index :work_packages, :category_id
remove_index :work_packages, :author_id
remove_index :work_packages, :assigned_to_id
remove_index :work_packages, :created_at
remove_index :work_packages, :fixed_version_id
end
end