Commit 51b0a02
committed
hotfix: replace ->change() with raw ALTER TABLE in nullable migration
The previous migration used:
$table->unsignedTinyInteger('orchestrator_priority')
->default(50)->nullable()->change();
->change() delegates to Doctrine DBAL to introspect the existing column
type before rewriting it. Doctrine does not have a registered mapping for
MySQL's TINYINT, so it throws:
Unknown column type "tinyinteger" requested. Any Doctrine type that
you use has to be registered with Doctrine\DBAL\Types\Type::addType().
Fix: replace the Blueprint::change() call with a raw DB::statement()
ALTER TABLE that modifies the column directly. This is fully portable
across all MySQL/MariaDB versions supported by Fleetbase and has no
dependency on Doctrine DBAL type mappings.1 parent 8988629 commit 51b0a02
1 file changed
Lines changed: 17 additions & 10 deletions
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
34 | | - | |
35 | | - | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
0 commit comments