$fixnull behavior is broken on PostgreSQL's ::addField()

Created on 31 May 2018, over 6 years ago
Updated 11 April 2023, over 1 year ago

Problem/Motivation

PostgreSQL's Schema::addField() does not properly detect when a field is part of a newly added primary key, so that it does not calculate T $fixnull variable correctly.

This is because a $keys_new variable is inspected but the variable is actually called $new_keys.

Proposed resolution

Because the variable is actually specified as $keys_new by the interface, rewrite usages of $new_keys to $keys_new instead of the other way around.

This will probably require #2974722: Fix dropping of columns in a composite primary key on MariaDB >=10.2.8 and make it consistent across database drivers for test coverage.

🐛 Bug report
Status

Closed: outdated

Version

10.1

Component
PostgreSQL driver 

Last updated 18 days ago

No maintainer
Created by

🇩🇪Germany tstoeckler Essen, Germany

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024