I'm doing the Michael Hartl Ruby on Rails Tutorial, and ran into this problem at the end of Chapter 11.
I did a migration to add activation_digest
, activated
, and activated_at
columns to my data model.
$ rails generate migration add_activation_to_users \
> activation_digest:string activated:boolean activated_at:datatime
As you can see, I wrote datatime
instead of datetime
.
Now my migration file looks like this:
class AddActivationToUsers < ActiveRecord::Migration[5.1]
def change
add_column :users, :activation_digest, :string
add_column :users, :activated, :boolean, default: false
add_column :users, :activated_at, :datatime
end
end
Can I simply fix this error by editing the migration file? Or should I re-run the migration at the command line? Is there a better way to do this?