Database server (MySQL, SQLite, Postgres): MySQL, 10.4.19-MariaDB - Source distribution
PHP Version: PHP 7.4.19
Platform / OS: Linux Mint 20.1
What you did
I wanted to rename a column. The Phinx documentation reads that is can bhe done with the Table::renameColumn() method. The CakePHP Migrations wrapper doesn't seem to support this.
<?php
declare(strict_types=1);
use Migrations\AbstractMigration;
class FlightplanRequester extends AbstractMigration
{
public function change()
{
$this->table('flightplans')
->renameColumn('pic_id', 'requester_id');
}
}
Expected Behavior
The migration succeeds, column flightplans.pic_id is renamed to flightplans.requester_id.
The CakePHP Migrations documentation states that it is a wrapper for Phinx. I would expect the wrapper to inherit this behaviour and execute the same functionality.
Actual Behavior
The migration succeeds, but the column flightplans.pic_id is not renamed.
This is a (multiple allowed):
[ ] bug
[x] enhancement
[ ] feature-discussion (RFC)
CakePHP Version: 4.2.6
Migrations plugin version: 3.0.0.
Bake plugin version (if relevant): 2.5.1.
Database server (MySQL, SQLite, Postgres): MySQL, 10.4.19-MariaDB - Source distribution
PHP Version: PHP 7.4.19
Platform / OS: Linux Mint 20.1
What you did
I wanted to rename a column. The Phinx documentation reads that is can bhe done with the
Table::renameColumn()
method. The CakePHP Migrations wrapper doesn't seem to support this.Expected Behavior
The migration succeeds, column
flightplans.pic_id
is renamed toflightplans.requester_id
.The CakePHP Migrations documentation states that it is a wrapper for Phinx. I would expect the wrapper to inherit this behaviour and execute the same functionality.
Actual Behavior
The migration succeeds, but the column
flightplans.pic_id
is not renamed.