-
-
Notifications
You must be signed in to change notification settings - Fork 539
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
Delete all PostgreSQL types when calling fresh (#765) #864
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!! @karpa4o4 LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw... it'd be better if we have a migration test where we have PostgreSQL types (e.g. Enum) defined on the db. Can you create a new migration file where it define a new Enum on PostgreSQL?
Hey @karpa4o4, I added a test for creating db enum on PostgreSQL Feel free to cherrypick :D |
@billy1624, done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! @karpa4o4 You can fix the fmt warnings if you have time. This PR is good to merge, we can fix that after merged as well :)
89c0e9e
to
ddf2983
Compare
@billy1624, the fmt warnings fixed. |
Thank you so much @karpa4o4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @karpa4o4, thanks again for contributing!! I'll merge this into a working branch and do a few refactoring before it get merged into master :)
* Delete all PostgreSQL types when calling fresh (#765) (#864) * Delete all PostgreSQL types when calling fresh (#765) * Test create db enum migration Co-authored-by: Billy Chan <[email protected]> * Refactoring Co-authored-by: Denis Gavrilyuk <[email protected]>
PR Info
Closes #765.
Adds
This PR adds the removal of all PostgreSQL types in the current schema when calling fresh on migrator.
Unfortunately, it was not possible to remove all types without
for
, because when callingnames
, incorrect SQL is compiled.