Ask A Question

Notifications

You’re not receiving notifications from this thread.

Update Devise Migration File and Run rails db:migrate - Nothing Happens.

Nick McNeany asked in Gems / Libraries

Hey everyone,

Quick question (I hope). I have an application with Devise's out-of-the-box initial set-up. Later, I realized I wanted to include the Trackable functionality so I included it in my model, and uncommented out the Trackable section in the migration file. When I run rails db:migrate nothing happens.

Is this not an acceptable way to do this? Should I run a separate migartion to add the columns I need?

Thanks of the help!

Nick

Reply

Absolutely unacceptable Nick.

🤣 Just teasing!

If you edit the migration, you'd have to do a rollback to undo that migration and then re-run it. Obviously that'd blow away a bunch of data, so to add trackable at a later time you'll want to just create a new migration to add those columns separately.

Reply

Haha!!!

Makes total sense. Thanks for the quick response Chris! You're the man!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.