gruby refaktor otyły panie
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
|
||||
// phpcs:ignore PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||
final class CreateAccessLogs extends AbstractMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$table = $this->table('access_logs');
|
||||
$table->addColumn('username', 'string')
|
||||
->addColumn('password', 'string')
|
||||
->addColumn('remote_ip', 'string')
|
||||
->addColumn('user_agent', 'text')
|
||||
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP'])
|
||||
->save();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->table('access_logs')->drop()->save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user