Jay Jay - 2 years ago 151
Ruby Question

Rails 4 Remove Migration ID from Migration Index

How do I remove a migration ID listing with "** NO FILE **" in rake db:migrate:status? For example:

Status Migration ID Migration Name
up 20131017204224 Create users
up 20131218005823 ********** NO FILE **********
up 20131218011334 ********** NO FILE **********

I'm not understanding why it would still keep an old migration file when I manually removed it myself as I was playing around with how migrations work. Is this for record keeping? But what use is it when I don't have a name associated with it?

I tried using db:migrate:down command for those files but it says file missing. I have no clue what to do here.

Can someone explain how to remove this listing and maybe some insight on why this might happen. I'm relatively new to RoR so please bare with me :)


Answer Source

You need to delete that numbers from your schema_migrations table in the database.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download