pgroll
pgroll copied to clipboard
Transform complete SQL migration files into pgroll operations
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.
- [x] add new command to transform SQL migration files into pgroll operations
- [ ] expose the new command
- [x] transform SQL statements line by line
- [ ] transform whole SQL migration files into pgroll migrations
- [ ] infer up and down migrations from context
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}