Document best practices with old migrations
Document best practices with old migrations

The copy here is of course up for discussion but it feels like we need
to address the issue of old migrations in the Migration guide because
other than mentioning the canonical nature of schema.rb/structure.sql
or the actual database compared to migration files, it seems like more
guidance would help.

Here's a sample of the kinds of question people seem to often ask about
old Rails migrations:

- https://stackoverflow.com/questions/20119391/delete-old-migrations-files-in-a-rails-app
- https://www.reddit.com/r/rails/comments/4ayosd/compacting_migrations_files_or_delete_them/
- https://stackoverflow.com/questions/4248682/is-it-a-good-idea-to-purge-old-rails-migration-files
- https://stackoverflow.com/questions/707013/is-it-a-good-idea-to-collapse-old-rails-migrations
- https://stackoverflow.com/questions/1981777/rails-remove-old-models-with-migrations
- https://stackoverflow.com/questions/3343534/rebase-rails-migrations-in-a-long-running-project

The common theme seems to be: "I've got old migrations, should I keep
them around on an old project?".

My personal stance is that as long as migrations run and don't take too long do
so, you should keep them around since it allows people working on the Rails
project with you to seamlessly upgrade their local development database
without having to do a `db:drop db:schema:load` and lose all their seed data.

While writing down this suggested new section it felt like I was describing a
very cumbersome process that could be address with a rake task like:

```bash
rails db:migrate:remove VERSION=20121201123456
```

It rollback to the version just before `20121201123456`, delete the migration
file, and run `db:migrate` to get back to the latest migration.

This of course doesn't address a situation when someone would want to delete or
merge all migrations prior to a certain date, which is addressed by
[squasher](https://github.com/jalkoby/squasher).

I'm not sure this is something we want to encourage people to do. Although I
feel like with more and more production Rails apps over 5-years old, it's
definitely a concern we should address.

illacceptanything/illacceptanything,Edouard-chin/rails,mohitnatoo/rails,schuetzm/rails,rafaelfranca/omg-rails,eileencodes/rails,tgxworld/rails,flanger001/rails,utilum/rails,prathamesh-sonpatki/rails,palkan/rails,tjschuck/rails,yhirano55/rails,illacceptanything/illacceptanything,shioyama/rails,rafaelfranca/omg-rails,BlakeWilliams/rails,yalab/rails,rails/rails,BlakeWilliams/rails,illacceptanything/illacceptanything,arunagw/rails,gauravtiwari/rails,Erol/rails,kmcphillips/rails,yahonda/rails,palkan/rails,fabianoleittes/rails,mechanicles/rails,kmcphillips/rails,eileencodes/rails,yalab/rails,starknx/rails,tjschuck/rails,schuetzm/rails,illacceptanything/illacceptanything,tgxworld/rails,rails/rails,lcreid/rails,palkan/rails,Vasfed/rails,Stellenticket/rails,repinel/rails,Vasfed/rails,fabianoleittes/rails,illacceptanything/illacceptanything,kddeisz/rails,bogdanvlviv/rails,arunagw/rails,BlakeWilliams/rails,rafaelfranca/omg-rails,iainbeeston/rails,baerjam/rails,flanger001/rails,gauravtiwari/rails,bogdanvlviv/rails,repinel/rails,baerjam/rails,georgeclaghorn/rails,Edouard-chin/rails,notapatch/rails,mohitnatoo/rails,mechanicles/rails,schuetzm/rails,shioyama/rails,yahonda/rails,yawboakye/rails,kmcphillips/rails,mohitnatoo/rails,Stellenticket/rails,jeremy/rails,bogdanvlviv/rails,rails/rails,flanger001/rails,jeremy/rails,vipulnsward/rails,esparta/rails,illacceptanything/illacceptanything,yawboakye/rails,printercu/rails,betesh/rails,printercu/rails,MSP-Greg/rails,illacceptanything/illacceptanything,arunagw/rails,flanger001/rails,illacceptanything/illacceptanything,eileencodes/rails,vipulnsward/rails,tjschuck/rails,utilum/rails,jeremy/rails,mohitnatoo/rails,illacceptanything/illacceptanything,arunagw/rails,EmmaB/rails-1,vipulnsward/rails,MSP-Greg/rails,notapatch/rails,yalab/rails,tgxworld/rails,esparta/rails,lcreid/rails,kddeisz/rails,mechanicles/rails,georgeclaghorn/rails,baerjam/rails,prathamesh-sonpatki/rails,kmcphillips/rails,utilum/rails,illacceptanything/illacceptanything,rails/rails,illacceptanything/illacceptanything,schuetzm/rails,kddeisz/rails,yhirano55/rails,joonyou/rails,Edouard-chin/rails,lcreid/rails,MSP-Greg/rails,fabianoleittes/rails,yahonda/rails,notapatch/rails,printercu/rails,Erol/rails,Edouard-chin/rails,jeremy/rails,kddeisz/rails,Envek/rails,illacceptanything/illacceptanything,Envek/rails,betesh/rails,joonyou/rails,baerjam/rails,gauravtiwari/rails,lcreid/rails,vipulnsward/rails,shioyama/rails,Vasfed/rails,Envek/rails,printercu/rails,yahonda/rails,shioyama/rails,illacceptanything/illacceptanything,eileencodes/rails,starknx/rails,EmmaB/rails-1,joonyou/rails,esparta/rails,utilum/rails,yawboakye/rails,MSP-Greg/rails,starknx/rails,illacceptanything/illacceptanything,yhirano55/rails,Envek/rails,tjschuck/rails,repinel/rails,esparta/rails,georgeclaghorn/rails,betesh/rails,illacceptanything/illacceptanything,yalab/rails,prathamesh-sonpatki/rails,notapatch/rails,Stellenticket/rails,BlakeWilliams/rails,Erol/rails,yawboakye/rails,joonyou/rails,EmmaB/rails-1,Stellenticket/rails,tgxworld/rails,iainbeeston/rails,betesh/rails,iainbeeston/rails,palkan/rails,Vasfed/rails,yhirano55/rails,georgeclaghorn/rails,fabianoleittes/rails,iainbeeston/rails,repinel/rails,bogdanvlviv/rails,mechanicles/rails,prathamesh-sonpatki/rails,Erol/rails