jackc / tern

The SQL Fan's Migrator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Archiving old migrations

jackc opened this issue · comments

After hundreds of migrations the migrations directory can get a little awkward to scroll through. It would be nice to have some way to move old migrations to a subdirectory to get them out of the way.

commented

It’s probably out of scope for this library, but what would be neat is to perform a roll-up of changes. E.g., apply 1-n schema changes, snapshot the complete schema, replace 1-n individual migrations with the snapshot.

I’ve thought about doing it myself manually, as when iterating on a new product I’ve got many migrations that negate earlier ones etc.

I made a separate issue for roll up migrations #52. I've also done that by hand before and a feature to do it would be nice, but it has some tricky edge cases.