Skip to content

Conversation

@dereuromark
Copy link
Member

Resolves #952

Issue: cakephp/phinx#2386
Impact: High - BC breaking bug
Status in Migrations:CONFIRMED BUG EXISTS
Location: src/Db/Adapter/SqlserverAdapter.php:316

The SqlServerAdapter::getColumns function returns an associative array of columns, where the keys are column names. All other adapters return a numeric array which is also expressed by our AdapterInterface

// Current (WRONG):
$columns[$columnInfo['name']] = $column;

// Should be:
$columns[] = $column;

The AdapterInterface specifies Column[] (numeric array) but SqlServer returns an associative array keyed by column names. This violates the contract and affects any code iterating over columns.

@markstory markstory merged commit 6d2569a into 5.x Nov 11, 2025
13 checks passed
@markstory markstory deleted the 5.x-sqlserver branch November 11, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants