Simone Carletti Simone Carletti - 1 year ago 79
Ruby Question

Is it a good idea to purge old Rails migration files?

I have been running a big Rails application for over 2 years and, day by day, my ActiveRecord migration folder has been growing up to over 150 files.

There are very old models, no longer available in the application, still referenced in the migrations. I was thinking to remove them.

What do you think? Do you usually purge old migrations from your codebase?

Answer Source

They are relatively small, so I would choose to keep them, just for the record.

You should write your migrations without referencing models, or other parts of application, because they'll come back to you haunting ;)

Check out these guidelines:

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