According to the documentation, this is an example migration that converts a string to datetime. I'm not sure if this will work, so you can try it on dev / stage env before moving on to prod env.
class ChangeColumnToUsers < ActiveRecord::Migration
def self.up
change_column :users, :created_at, :datetime
end
def self.down
change_column :users, :created_at, :string
end
end
source
share