Open
Description
This is a (multiple allowed):
-
bug
-
CakePHP Version: 4.4.16
-
Migrations plugin version: 3.9.0
-
Bake plugin version (if relevant): 2.9.3
-
Database server (MySQL, SQLite, Postgres): MariaDB
I have a MariaDB with a table containing a decimal column (e.g., defined as DECIMAL(4,2)). A migration snapshot was taken of this. If the definition is then changed (e.g., to DECIMAL(6,2)) and a migration diff is created, this leads to incorrect code.
The resulting code is
$this->table('mytable')
->changeColumn('mycolumn', 'decimal', [
'default' => null,
'limit' => 6,
'null' => true,
])
and should be
$this->table('mytable')
->changeColumn('mycolumn', 'decimal', [
'default' => null,
'precision' => 6,
'scale' => 2,
'null' => true,
])
Metadata
Metadata
Assignees
Labels
No labels