Skip to content
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

fix #6198: stop considering generated column definition as being its default value #6199

Open
wants to merge 1 commit into
base: 3.8.x
Choose a base branch
from

Commits on Mar 20, 2024

  1. fix doctrine#6198: stop considering generated column definition as be…

    …ing its default value
    
    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.
    allan-simon authored and greg0ire committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    46e5b94 View commit details
    Browse the repository at this point in the history