Skip to content

CP-17814 sqlite composite references - #17818

Merged
niden merged 2 commits into
5.0.xfrom
CP-17814-sqlite-composite-references
Nov 27, 2026
Merged

niden merged 2 commits into
5.0.xfrom
CP-17814-sqlite-composite-references

Conversation

@niden

@niden niden commented Nov 27, 2026

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Phalcon\Db\Adapter\Pdo\Sqlite::describeReferences() now names each reference from the id of PRAGMA foreign_key_list (column 0), not from the row number. The rows of a composite key have the same id, so the key is one reference with all its columns, in the order of the key.

For a table with only single-column keys, the names do not change. For a table with a composite key, the names of the keys after it change (upgrade note in the changelog).

Thanks

…ite::describeReferences()

Assisted-by: Claude Code
Assisted-by: Claude Code
@niden niden added bug A bug report status: medium Medium 5.0 The issues we want to solve in the 5.0 release labels Nov 27, 2026
@niden niden self-assigned this Nov 27, 2026
@niden niden mentioned this pull request Nov 27, 2026
4 of 5 tasks
@niden
niden merged commit 04775cb into 5.0.x Nov 27, 2026
120 checks passed
@niden
niden deleted the CP-17814-sqlite-composite-references branch November 27, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant