Skip to content

FIX / Make glpi_plugin_jamf_devices.jamf_items_id unsigned - #45

Merged
Rom1-B merged 1 commit into
11.0/bugfixesfrom
fix/jamf-items-id-unsigned
Oct 19, 2026
Merged

Rom1-B merged 1 commit into
11.0/bugfixesfrom
fix/jamf-items-id-unsigned

Conversation

@Mary-Clb

Copy link
Copy Markdown

Running php bin/console migration:unsigned_keys on an instance with the Jamf plugin fails with "Migration of column "glpi_plugin_jamf_devices.jamf_items_id" cannot be done as its default value is negative." The column was created by the 2.1.0 migration as a signed int(11) with a default value of -1, inherited from the old "no Jamf ID" placeholder, so the core command refuses to convert it, and it would also refuse to convert it if any row still held -1.

A new 3.2.4 migration step sets any negative jamf_items_id values to 0 and then converts the column to the standard unsigned foreign key type with a default value of 0. A unit test rebuilds the legacy column definition with a -1 row and checks that the migration leaves the column unsigned and that the row is updated.

@Mary-Clb
Mary-Clb marked this pull request as ready for review October 12, 2026 14:02
@Mary-Clb
Mary-Clb requested a review from RomainLvr October 14, 2026 10:00
@Mary-Clb Mary-Clb assigned Mary-Clb and unassigned Lainow Oct 14, 2026
@Rom1-B
Rom1-B self-requested a review October 19, 2026 11:52
@Rom1-B
Rom1-B merged commit 8b35b8c into 11.0/bugfixes Oct 19, 2026
7 checks passed
@Rom1-B
Rom1-B deleted the fix/jamf-items-id-unsigned branch October 19, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants