Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (11 sloc) 339 Bytes
class FixVersionDates < ActiveRecord::Migration
def self.up
rename_column :versions, :created_at, :built_at
add_column :versions, :created_at, :datetime
Version.update_all('created_at = updated_at')
end
def self.down
remove_column :versions, :created_at
rename_column :versions, :built_at, :created_at
end
end
Something went wrong with that request. Please try again.