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/20170418064453_add_timestam...

18 lines
753 B

class AddTimestampToCustomFields < ActiveRecord::Migration[5.0]
def up
add_column :custom_fields, :created_at, :datetime unless column_exists? :custom_fields, :created_at
add_column :custom_fields, :updated_at, :datetime unless column_exists? :custom_fields, :updated_at
add_column :custom_options, :created_at, :datetime unless column_exists? :custom_options, :created_at
add_column :custom_options, :updated_at, :datetime unless column_exists? :custom_options, :updated_at
end
def down
remove_column :custom_fields, :created_at, :datetime
remove_column :custom_fields, :updated_at, :datetime
remove_column :custom_options, :created_at, :datetime
remove_column :custom_options, :updated_at, :datetime
end
end