-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
ENUM changes not creating migration changes for columns with a ENUM[] type #203
Comments
thanks @maximsmol! Any idea if this is something that can be fixed? |
Sorry, didn't check GitHub notifs for a few days after going over the issues backlog. Seems like it's not detecting the list-of-enums column as dependent on the enum's definition. Should be an easy fix if you wanna have a go at it, I'll be doing a bunch of project-wide things for a while before I get to specific issues. |
Cool. Could you point in a direction of where the code change would need to happen? |
… manage dependencies correctly so those enums can be changed; I think this fixes djrobstep/migra#203 on the related migra package
I think I have working fix (that at least works for my limited very similar scenario). The patch is just on the relations query of the schemainspect dependency. See: |
I've also got a generic array dependency handling over here (it's mixed in with handling comments also) As well as adding a topological sort of the table dependencies to handle tables with array types joshainglis/migra@0a9a62c...joshainglis:migra:master |
Oh awesome, thanks @joshainglis -- comments is another thing on my list that I do poorly (and they matter for postgraphile lots). @djrobstep are you interested in PRs for these improvements? |
say we had a table with two enum based columns where one is a enum val and one is a list.
If I change the entities in the underlying enum type, no migration statement is generated for the column with a enum list type.
I changed the test_enum type to
test_enum: [val_1, val_2, val_3]
a migration would be generated as so
this will fail because it will complain about test_table.column_enum_list still using the []test_enum__old_version_to_be_dropped type.
The text was updated successfully, but these errors were encountered: