Array and base_column nesting in migrations and create_pydantic_model #809
-
Auto migrations don't appear to capture changes to base_column type in an Array column, which can cause discrepancies between the database and the tables. This can be solved with manual migrations but that may be something worth documenting? Or is there potentially a deeper issue? Additionally, create_pydantic_model does not look at the configuration of the base_column (null=True, default =None, etc) so when validating data does not properly take into account what's acceptable/expected. Any plans to add that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks - they are some good observations which need fixing.
Good point - the migrations might not be handling that correctly. Array columns are a special case which require specific logic. The migrations should distinguish between different array types. Hopefully this is a fairly simple fix. I'll create an issue.
I hadn't considered that before. This is something we should be able to change quite easily. |
Beta Was this translation helpful? Give feedback.
Thanks - they are some good observations which need fixing.
Good point - the migrations might not be handling that correctly. Array columns are a special case which require specific logic. The migrations should distinguish between different array types. Hopefully this is a fairly simple fix. I'll create an issue.