phpcs phpcbf
This commit is contained in:
@@ -3,43 +3,42 @@ declare(strict_types=1);
|
||||
|
||||
use Migrations\AbstractMigration;
|
||||
|
||||
class InitialAddressesDynamicForeignKey extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
class InitialAddressesDynamicForeignKey extends AbstractMigration {
|
||||
|
||||
/**
|
||||
* Up Method.
|
||||
*
|
||||
* More information on this method is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-up-method
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$this->table('addresses')
|
||||
->addColumn('foreign_key', 'string', [
|
||||
'limit' => 45,
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
])
|
||||
->addColumn('model', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
])
|
||||
->update();
|
||||
}
|
||||
public function up(): void {
|
||||
$this->table('addresses')
|
||||
->addColumn('foreign_key', 'string', [
|
||||
'limit' => 45,
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
])
|
||||
->addColumn('model', 'string', [
|
||||
'limit' => 255,
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
])
|
||||
->update();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Down Method.
|
||||
*
|
||||
* More information on this method is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-down-method
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$this->table('addresses')
|
||||
->removeColumn('foreign_key')
|
||||
->removeColumn('model')
|
||||
->save();
|
||||
}
|
||||
public function down(): void {
|
||||
$this->table('addresses')
|
||||
->removeColumn('foreign_key')
|
||||
->removeColumn('model')
|
||||
->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user