src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 637-645 (lines=9) @@
|
| 634 |
|
/** |
| 635 |
|
* {@inheritdoc} |
| 636 |
|
*/ |
| 637 |
|
protected function getAddForeignKeyInstructions(Table $table, ForeignKey $foreignKey) |
| 638 |
|
{ |
| 639 |
|
$alter = sprintf( |
| 640 |
|
'ADD %s', |
| 641 |
|
$this->getForeignKeySqlDefinition($foreignKey) |
| 642 |
|
); |
| 643 |
|
|
| 644 |
|
return new AlterInstructions([$alter]); |
| 645 |
|
} |
| 646 |
|
|
| 647 |
|
/** |
| 648 |
|
* {@inheritdoc} |
src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 707-715 (lines=9) @@
|
| 704 |
|
/** |
| 705 |
|
* {@inheritdoc} |
| 706 |
|
*/ |
| 707 |
|
protected function getAddForeignKeyInstructions(Table $table, ForeignKey $foreignKey) |
| 708 |
|
{ |
| 709 |
|
$alter = sprintf( |
| 710 |
|
'ADD %s', |
| 711 |
|
$this->getForeignKeySqlDefinition($foreignKey, $table->getName()) |
| 712 |
|
); |
| 713 |
|
|
| 714 |
|
return new AlterInstructions([$alter]); |
| 715 |
|
} |
| 716 |
|
|
| 717 |
|
/** |
| 718 |
|
* {@inheritdoc} |