2 Commits
Author SHA1 Message Date
TheWitness 7b551eea72 chore: normalize CRLF line endings to LF across Cacti-owned files (#8156)
Excludes vendored packages, third-party JS, patches, and the Win32 probe fixture. Pure EOL change; guards pass and php -l is clean.
2026-10-02 17:22:42 -04:00
TheWitness d4f2bd1f3b Restore legacy unique_keys[] support in the schema API (#8116)
* Restore legacy unique_keys[] support in the schema API

develop expresses a unique index as a `keys[]` entry with `'unique' => true`,
and both db_table_create() and db_update_table() were rewritten to only read
that form. Plugins that still use the legacy `unique_keys[]` definition style
(supported on 1.2.x) therefore get no UNIQUE index created, and any existing
one dropped on the next schema refresh.

Fold a legacy `unique_keys[]` definition into `keys[]` with the unique flag at
the top of both functions, so the existing unique-aware key handling applies
to it. New-style `keys[]` with `'unique' => true` continues to work unchanged.

* CHANGELOG: reference PR #8116

* Fix CHANGELOG format and add unique_keys[] regression coverage

CHANGELOG: use the -issue#8116 entry form (the -bug prefix and trailing (#NNNN) failed the CHANGELOG format check) and place it in the issue block so the security-issue-feature ordering holds. Adds DbUpdateTableUniqueKeysTest covering db_table_create() emitting the UNIQUE index and db_update_table() adding a missing one and preserving an existing one for a legacy unique_keys[] definition. FakeMySQLPDO now projects Seq_in_index/Column_name/Non_unique for named secondary indexes so the reconciliation path can be exercised.
2026-09-29 23:08:41 -04:00