Commit b139fc51 authored by Benjamin Eberlei's avatar Benjamin Eberlei

[DBAL-530] Fix foreign key table not supporting "multi"-database support in Sqlite

parent 45b21275
......@@ -275,6 +275,20 @@ class SqlitePlatform extends AbstractPlatform
return 'INTEGER';
}
/**
* {@inheritDoc}
*/
public function getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey)
{
return parent::getForeignKeyDeclarationSQL(new ForeignKeyConstraint(
$foreignKey->getLocalColumns(),
str_replace('.', '__', $foreignKey->getForeignTableName()),
$foreignKey->getForeignColumns(),
$foreignKey->getName(),
$foreignKey->getOptions()
));
}
/**
* {@inheritDoc}
*/
......
......@@ -89,6 +89,14 @@ class ForeignKeyConstraint extends AbstractAsset implements Constraint
$this->_localTable = $table;
}
/**
* @return Table
*/
public function getLocalTable()
{
return $this->_localTable;
}
/**
* @return array
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment