2022-12-20
This commit is contained in:
14
api/db/migrations/20211329163000_cuenta_moneda_foreign.php
Normal file
14
api/db/migrations/20211329163000_cuenta_moneda_foreign.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user