15 lines
345 B
PHP
15 lines
345 B
PHP
|
<?php
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
use Phinx\Migration\AbstractMigration;
|
||
|
|
||
|
final class CuentaMonedaForeign extends AbstractMigration
|
||
|
{
|
||
|
public function change(): void
|
||
|
{
|
||
|
$this->table('cuentas')
|
||
|
->addForeignKey('moneda_id', 'monedas', ['id'], ['delete' => 'cascade', 'update' => 'cascade'])
|
||
|
->update();
|
||
|
}
|
||
|
}
|