pgroll icon indicating copy to clipboard operation
pgroll copied to clipboard

Transform complete SQL migration files into pgroll operations

Open kvch opened this issue 8 months ago • 0 comments

The goal of this project is to translate SQL migration files generated by ORMs (Prisma, Django, Drizzle) into pgroll migrations. So ORM users can leverage the safe migrations and test with multiple versions provided by pgroll. At the moment, the support is limited to translating single SQL statements into pgroll migrations. The up and down migrations must be filled in by the user. However, if pgroll reads whole migration file, it can infer up and down migrations, too.

CLI

Expose new command named convert. It takes the SQL migration file as a parameter and prints the generated pgroll migrations to stdout.

pgroll convert {path-to-sql-file}

kvch avatar Feb 13 '25 17:02 kvch