Commit fc84c5f
committed
Fix LONGTEXT columns becoming TEXT in generated migrations
The issue was a mismatch between CakePHP's LENGTH_LONG constant (4294967295)
and migrations' TEXT_LONG constant (2147483647).
When using `bake migration_diff`, CakePHP's schema reflection returns
LENGTH_LONG for LONGTEXT columns, but MysqlAdapter expected TEXT_LONG.
This fix:
1. MigrationHelper: Convert LENGTH_LONG to TEXT_LONG when generating migrations
2. MysqlAdapter: Accept both constants for backward compatibility with existing
migrations that have the wrong value
Fixes #10291 parent 6f57c07 commit fc84c5f
File tree
2 files changed
+12
-1
lines changed- src
- Db/Adapter
- View/Helper
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
377 | 379 | | |
378 | | - | |
| 380 | + | |
379 | 381 | | |
380 | 382 | | |
381 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
448 | 457 | | |
449 | 458 | | |
450 | 459 | | |
| |||
0 commit comments