Skip to content

Array and base_column nesting in migrations and create_pydantic_model #809

Discussion options

You must be logged in to vote

Thanks - they are some good observations which need fixing.

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?

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.

Additionally, create_pydantic_model does not look at the configuration of the base_column (null=T…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@williamflaherty
Comment options

williamflaherty Apr 19, 2023
Collaborator Author

Answer selected by williamflaherty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants