Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform complete SQL migration files into pgroll operations #683

Open
2 of 5 tasks
kvch opened this issue Feb 13, 2025 · 0 comments
Open
2 of 5 tasks

Transform complete SQL migration files into pgroll operations #683

kvch opened this issue Feb 13, 2025 · 0 comments
Assignees
Labels
sql2pgroll Issues relating to the sql2pgroll package

Comments

@kvch
Copy link
Contributor

kvch commented Feb 13, 2025

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 kvch added the sql2pgroll Issues relating to the sql2pgroll package label Feb 13, 2025
@kvch kvch self-assigned this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql2pgroll Issues relating to the sql2pgroll package
Projects
None yet
Development

No branches or pull requests

1 participant