src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 773-781 (lines=9) @@
|
| 770 |
|
/** |
| 771 |
|
* {@inheritdoc} |
| 772 |
|
*/ |
| 773 |
|
protected function getAddForeignKeyInstructions(Table $table, ForeignKey $foreignKey) |
| 774 |
|
{ |
| 775 |
|
$alter = sprintf( |
| 776 |
|
'ADD %s', |
| 777 |
|
$this->getForeignKeySqlDefinition($foreignKey) |
| 778 |
|
); |
| 779 |
|
|
| 780 |
|
return new AlterInstructions([$alter]); |
| 781 |
|
} |
| 782 |
|
|
| 783 |
|
/** |
| 784 |
|
* {@inheritdoc} |
src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 851-859 (lines=9) @@
|
| 848 |
|
/** |
| 849 |
|
* {@inheritdoc} |
| 850 |
|
*/ |
| 851 |
|
protected function getAddForeignKeyInstructions(Table $table, ForeignKey $foreignKey) |
| 852 |
|
{ |
| 853 |
|
$alter = sprintf( |
| 854 |
|
'ADD %s', |
| 855 |
|
$this->getForeignKeySqlDefinition($foreignKey, $table->getName()) |
| 856 |
|
); |
| 857 |
|
|
| 858 |
|
return new AlterInstructions([$alter]); |
| 859 |
|
} |
| 860 |
|
|
| 861 |
|
/** |
| 862 |
|
* {@inheritdoc} |