tracks/db/migrate/003_created_at.rb

13 lines
369 B
Ruby
Raw Permalink Normal View History

2019-05-13 18:42:57 +02:00
class CreatedAt < ActiveRecord::Migration[5.2]
# Current bug in Rails that prevents rename_column working in SQLite
# if the column names use symbols instead of strings.
# <http://dev.rubyonrails.org/changeset/2731>
def self.up
rename_column :todos, 'created', 'created_at'
end
def self.down
rename_column :todos, 'created_at', 'created'
end
end