We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
CakePHP Version: 4.2.2
Platform and Target: Windows 10 (XAMPP) PHP 7.2, 10.1.35-MariaDB
I have some BLOB and MEDIUMBLOB columns on Database:
-- EXAMPLE CREATE TABLE `measures` ( `id` int(11) NOT NULL, `title` blob NOT NULL, `text` mediumblob NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, `deleted` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
This is the resulting code after running bin/cake bake migration_diff measures:
bin/cake bake migration_diff measures
$this->table('measures') ->addColumn('title', 'binary', [ 'default' => null, 'limit' => null, // <----- PROBLEM HERE 'null' => false, ]) ->addColumn('text', 'binary', [ 'default' => null, 'limit' => 16777215, 'null' => false, ])
The problem is that when you run that migration in another machine using bin/cake migrations migrate
bin/cake migrations migrate
the resulting column type for title is not BLOB but BINARY(255)
title
If ColumnType is BLOB, the limit should be 65535. (Stack Overflow)
I edited the migration, replaced the 'limit' => null with 'limit' => 65535 and ran the migration in a blank database. It worked as espected.
'limit' => null
'limit' => 65535
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
CakePHP Version: 4.2.2
Platform and Target: Windows 10 (XAMPP) PHP 7.2, 10.1.35-MariaDB
What you did
I have some BLOB and MEDIUMBLOB columns on Database:
What happened
This is the resulting code after running
bin/cake bake migration_diff measures
:The problem is that when you run that migration in another machine using
bin/cake migrations migrate
the resulting column type for
title
is not BLOB but BINARY(255)What you expected to happen
If ColumnType is BLOB, the limit should be 65535. (Stack Overflow)
What you have tried
I edited the migration, replaced the
'limit' => null
with'limit' => 65535
and ran the migration in a blank database. It worked as espected.The text was updated successfully, but these errors were encountered: