Migration foreign keys
This commit is contained in:
@ -53,9 +53,13 @@ final class CreateSources extends AbstractMigration
|
||||
'encoding' => 'utf8mb4',
|
||||
'after' => 'url',
|
||||
])
|
||||
->addIndex(['currency_id'], [
|
||||
/*->addIndex(['currency_id'], [
|
||||
'name' => 'currency_id',
|
||||
'unique' => false,
|
||||
])*/
|
||||
->addForeignKey(['currency_id'], 'currencies', ['id'], [
|
||||
'delete' => 'CASCADE',
|
||||
'update' => 'CASCADE'
|
||||
])
|
||||
->create();
|
||||
}
|
||||
|
Reference in New Issue
Block a user