Repository navigation
chore(l12): keep fresh-install columns identical without Doctrine - #422
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 bothup()anddown(). Laravel 11+ native column changes keep only the attributes that are restated, so these columns would otherwise becomeNOT NULL. Affected migrations: issues, avatar URL, service quote amount, and asset and vehicle spec columns.unsignedDecimalreplaced withdecimal()->unsigned()in 4 migrations. It was removed in Laravel 11.routes.total_timeisDOUBLE(12,2)and thesensorsthresholds areDOUBLE(8,2).Blueprint::double()andfloat()drop total and places on Laravel 11+.TableIndexesin the 2025-12-16 performance index migration, this repo's existing helper, rather than theSchema::getIndexes()calls used in the other schema prep PRs.Verification
Fresh
migrateon MySQL 8.0 and Laravel 10.50, comparingSHOW CREATE TABLEdumps:mainvs this branch, with Doctrine: no differences.mainvs this branch, with DBAL hidden and native schema operations: only the(DC2Type:guid)comments, which are a Doctrine artifact.mainwith native operations, as a control: shows the regressions these changes prevent, includingNOT NULLflips.maindatabase: no schema changes.Not run: the FleetOps test suite (this PR only changes migrations),
down()methods, and a real Laravel 12 install.