Closed dereuromark closed 6 months ago
While trying to squash all migrations files into one by rebaking a initial snapshot the diff seems to outline quite a bit of data loss on the structure of the sql schema
I wonder which ones of those could and should be fixed: https://github.com/dereuromark/cakephp-sandbox/pull/66/commits/8138028970814b4853029ca28229e6096e4d4ee4 All of those are on MySQL
So to outline the important ones:
- `image` blob DEFAULT NULL, + `image` binary(255) DEFAULT NULL,
For fixture data
'image' => ['type' => 'binary', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
and generated migrations schema
->addColumn('image', 'binary', [ 'default' => null, 'limit' => null, 'null' => true, ])
- `status` tinyint(2) UNSIGNED NOT NULL DEFAULT 0, + `status` tinyint(4) UNSIGNED NOT NULL DEFAULT 0,
For
'status' => ['type' => 'integer', 'null' => false, 'default' => '0', 'length' => 2],
and generated
->addColumn('status', 'tinyinteger', [ 'default' => '0', 'limit' => null, 'null' => false, 'signed' => false, ])
This refs https://github.com/cakephp/migrations/issues/502
3.x
8.2
Description
While trying to squash all migrations files into one by rebaking a initial snapshot the diff seems to outline quite a bit of data loss on the structure of the sql schema
I wonder which ones of those could and should be fixed: https://github.com/dereuromark/cakephp-sandbox/pull/66/commits/8138028970814b4853029ca28229e6096e4d4ee4 All of those are on MySQL
So to outline the important ones:
binary
For fixture data
and generated migrations schema
tinyint for enum
For
and generated
This refs https://github.com/cakephp/migrations/issues/502
Bake Version
3.x
PHP Version
8.2