I recently posted this question
which worked locally with the answer that I selected correctly, here is the migration that I used essentially:
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
After running heroku rake db: migrate, I got this error:
rake aborted!
An error has occurred, this and all later migrations canceled:
PGError: ERROR: column "deadline" cannot be cast to type "date"
: ALTER TABLE "tasks" ALTER COLUMN "deadline" TYPE date
(See full trace by running task with
(in /disk1/home/slugs/18c5c920-2e22-40f5-8d6a-b20a0fc5d7ba/mnt)
== ChangeColumnToUsers: migrating ============================================
Any ideas?
source
share