Skip to content

chore(l12): keep fresh-install columns identical without Doctrine - #422

Merged
roncodes merged 1 commit into
release/v0.7.0from
chore/l12-schema-prep
Nov 6, 2026
Merged

roncodes merged 1 commit into
release/v0.7.0from
chore/l12-schema-prep

Conversation

@roncodes

@roncodes roncodes commented Nov 5, 2026

Copy link
Copy Markdown
Member

Prepares FleetOps migrations for the Laravel 12 upgrade while still running on Laravel 10, so that a fresh install keeps today's schema. The effect of each migration on existing databases doesn't change.

Changes

  • nullable() restated on ->change() calls, in both up() and down(). Laravel 11+ native column changes keep only the attributes that are restated, so these columns would otherwise become NOT NULL. Affected migrations: issues, avatar URL, service quote amount, and asset and vehicle spec columns.
  • unsignedDecimal replaced with decimal()->unsigned() in 4 migrations. It was removed in Laravel 11.
  • Double precision pinned in SQL, guarded on the MySQL driver: routes.total_time is DOUBLE(12,2) and the sensors thresholds are DOUBLE(8,2). Blueprint::double() and float() drop total and places on Laravel 11+.
  • Index check moved to TableIndexes in the 2025-12-16 performance index migration, this repo's existing helper, rather than the Schema::getIndexes() calls used in the other schema prep PRs.

Verification

Fresh migrate on MySQL 8.0 and Laravel 10.50, comparing SHOW CREATE TABLE dumps:

  • main vs this branch, with Doctrine: no differences.
  • main vs this branch, with DBAL hidden and native schema operations: only the (DC2Type:guid) comments, which are a Doctrine artifact.
  • main with native operations, as a control: shows the regressions these changes prevent, including NOT NULL flips.
  • Upgrade from a main database: no schema changes.

Not run: the FleetOps test suite (this PR only changes migrations), down() methods, and a real Laravel 12 install.

Restate nullable on ->change() calls, which Laravel 11+ no longer preserves.
Replace unsignedDecimal with decimal()->unsigned(), set DOUBLE(12,2) on routes and
DOUBLE(8,2) on the sensors thresholds in SQL since Blueprint::double() and float()
drop total and places, and check indexes through TableIndexes. Fresh MySQL schema
is unchanged on Laravel 10.
@roncodes
roncodes merged commit c1b0aca into release/v0.7.0 Nov 6, 2026
4 of 6 checks passed
@roncodes
roncodes deleted the chore/l12-schema-prep branch November 6, 2026 02:42
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.

1 participant