Here are a few gotchas:
- If you were running
springand didn't stop it before you squashed migrations,springmight have it's database config change (it'll look for thesquasherdatabase that was created temporarily). If you want to go back to your development database, justspring stopand then setup your database (however you do that) again. - You can run into
rake db:migrateproblems because the new squashed migration version has not been added to theschema_migrationstable that tells Rails what migrations have already been run. Thus, yourrake db:migratecommand will be trying to create tables (via thesquasherXXXX_init_schemamigration) that already exist. The solution to this is to manually insert the value of yourXXXX_init_schemamigration into theschema_migrationtable:
psqlinsert into schema_migrations (version) values ('99999999999999');, where the99999999999999value is actually the timestamp that appears in theXXXX_init_schemamigration.