new migration
This commit is contained in:
parent
71a275198f
commit
d0224f6746
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Phinx\Db\Adapter\MysqlAdapter;
|
||||
|
||||
class AddSelfToNameservers extends Phinx\Migration\AbstractMigration
|
||||
{
|
||||
public function change()
|
||||
{
|
||||
$this->table('domains', [
|
||||
'id' => false,
|
||||
'primary_key' => ['id'],
|
||||
'engine' => 'InnoDB',
|
||||
'encoding' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'comment' => '',
|
||||
'row_format' => 'DYNAMIC',
|
||||
])
|
||||
->removeColumn('self')
|
||||
->save();
|
||||
$this->table('nameservers', [
|
||||
'id' => false,
|
||||
'primary_key' => ['id'],
|
||||
'engine' => 'InnoDB',
|
||||
'encoding' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'comment' => '',
|
||||
'row_format' => 'DYNAMIC',
|
||||
])
|
||||
->addColumn('self', 'enum', [
|
||||
'null' => false,
|
||||
'limit' => 3,
|
||||
'values' => ['yes', 'no'],
|
||||
'after' => 'apikey_prefix',
|
||||
])
|
||||
->save();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue