Skip to content

Stop considering generated column definition as being its default value#6199

Merged
derrabus merged 1 commit intodoctrine:3.9.xfrom
allan-simon:fix_6198
Aug 14, 2024
Merged

Stop considering generated column definition as being its default value#6199
derrabus merged 1 commit intodoctrine:3.9.xfrom
allan-simon:fix_6198

Conversation

@allan-simon
Copy link
Copy Markdown
Contributor

Q A
Type bug/feature/improvement
Fixed issues #6198

Summary

The pg_get_expr(adbin, adrelid) expression in Postgresql's internal table pg_attrdef is used to know a column definition

for most column, if this returns something, it means this column's default value. So DBAL has been considering has ALWAYS meaning it contains its default.

However for generated columns, it contains the value definition and not its default value, so we change the selectTableColumns' query to correctly set the 'default' column to null for generated columns

It will help setting correctly the column's attributes which in turn will help generate correct schema diff.

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants