25 lines
644 B
PHP
25 lines
644 B
PHP
|
<?php
|
||
|
|
||
|
use Phinx\Db\Adapter\MysqlAdapter;
|
||
|
|
||
|
class ApiKeyCreationDate extends Phinx\Migration\AbstractMigration
|
||
|
{
|
||
|
public function change()
|
||
|
{
|
||
|
$this->table('apikeys', [
|
||
|
'id' => false,
|
||
|
'primary_key' => ['id'],
|
||
|
'engine' => 'InnoDB',
|
||
|
'encoding' => 'utf8mb4',
|
||
|
'collation' => 'utf8mb4_unicode_ci',
|
||
|
'comment' => '',
|
||
|
'row_format' => 'DYNAMIC',
|
||
|
])
|
||
|
->addColumn('created_at', 'timestamp', [
|
||
|
'null' => false,
|
||
|
'after' => 'apikey',
|
||
|
])
|
||
|
->save();
|
||
|
}
|
||
|
}
|