Ability to Squash Migrations #2859
Replies: 1 comment 1 reply
-
As I discovered Cursor AI, I decided to have it take a crack at a fundamental implementation of squash. After hours and hours of trying something, finding either an error or something wasn't right with the result, then repeating many times (I had it in Agent-mode and let it auto-run), it came up with what I wanted. With how long it took to get to the solution and how small things tripped it up, I'm sure this implementation wouldn't stand up past a basic squash (in my test, I added a boolean in a migration, added an integer in another migration, removed the boolean in a final migration, then squashed it to an initial migration and it had a create table with only the integer and other fields I had initially been in the entity). I have a feature branch in a fork under me (not sure how long I'll leave it) that you can see at https://github.com/NebraskaCoder/drizzle-orm/tree/feature/squash. As stated, it probably doesn't hold up and was 100% done by AI with no checking or modifications by me. |
Beta Was this translation helpful? Give feedback.
-
Django has a feature where you can squash a bunch of migration files (see https://docs.djangoproject.com/en/5.1/topics/migrations/#squashing-migrations for exact details). Do you have any plans to implement this? I'm not a fan of eventually having hundreds of migration files, especially if the project is private and I control the databases.
Beta Was this translation helpful? Give feedback.
All reactions