0

I'd like to use the MysqlAdapter::FIRST constant of phinx to set a new column as first column in a new table. The migration does run through, but does not set the desired column as first column.

I already checked the documentation and had a look at the unittest on Github.

The $this->table method does not allow a third value, which leads me to this code below:

$table = $this->table('acbase', ['id' => 'idAcBase']);  
        $table->addColumn('acbase_TS', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'update'=> 'CURRENT_TIMESTAMP', 'after' => \Phinx\Db\Adapter\MysqlAdapter::FIRST])
            ->create();

0 Answers0