drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
21.47k stars 486 forks source link

[FEATURE]: Merge conflicting migrations #2488

Open MatanYadaev opened 3 weeks ago

MatanYadaev commented 3 weeks ago

Describe what you want

A way to merge multiple migrations that have the same ID. This issue might occur when multiple developers add migrations in parallel in different PRs. It must be fixed somehow because otherwise the migrations won't work. Currently the only way to fix these conflicting migrations are manually. I suggest having a command that will fix it automatically.

Django does it with the command makemigration --merge: https://docs.djangoproject.com/en/5.0/ref/django-admin/#cmdoption-makemigrations-merge