-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
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
bake migration_snapshot bug with binary length #331
Comments
It is weird that CakePHP itself has I had to workaround using
for now. |
Given that cakephp/phinx#1320 is enabling Phinx to have a EDIT
It seems the generated migration cannot be understood by Phinx right now. So it seems Bake is fine once we fix Phinx to understand this type. |
Having binaryuuid in phinx seems like the best path forward to me. I would prefer if the migrations plugin was a thin wrapper around phinx so that we don't burn time trying to locate in which layer problems exist. |
cakephp/phinx#1734 solves it E.g. $this->table('ztable', ['id' => false, 'primary_key' => ['id']])
->addColumn('id', 'binaryuuid', [
'default' => null,
'limit' => null,
'null' => false,
])
->addColumn('user_id', 'integer', [
'default' => null,
'limit' => 11,
'null' => false,
])
->create(); |
This is a (multiple allowed):
We got the following DB:
After running bin/cake bake migration_snapshot Init I get:
But in fact this drops the 16 length.
So on the next DB this will become faulty:
latest 3.5 and migrations plugin
The text was updated successfully, but these errors were encountered: