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

Allow raw SQL with explicit structure changes #6

Open
WebFreak001 opened this issue Dec 19, 2023 · 0 comments
Open

Allow raw SQL with explicit structure changes #6

WebFreak001 opened this issue Dec 19, 2023 · 0 comments

Comments

@WebFreak001
Copy link
Member

scenario:

  • you change a column which rorm-cli can't automatically migrate, e.g. it will create a DeleteField and CreateField entry
  • you provide raw SQL statements to do the migration without data-loss, while it isn't otherwise supported by rorm-cli

now I want to be able to continue creating future migrations based on the model like it is described with the DeleteField/CreateField, however I want to be able to keep my data with the SQL statement. For this I would need rorm-cli to not actually execute the DeleteField/CreateField, but rather only my raw SQL statement.

structure_safe already exists on the raw SQL statement step, however AFAICT the other steps such as DeleteField and CreateField would still run, causing data loss on my table or requiring workarounds with an SQL statement before and after, basically copying or renaming the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant