From 10f0d1f6925406aa4c6bdc26cc8b9ec78d69d31e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 22 Dec 2018 19:54:18 +0100 Subject: [PATCH] Fix whitespace --- DataStorage/Database/Schema/Builder.php | 4 ++-- DataStorage/Database/Schema/Grammar/MysqlGrammar.php | 4 ++-- Module/InstallerAbstract.php | 2 +- Module/UninstallerAbstract.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DataStorage/Database/Schema/Builder.php b/DataStorage/Database/Schema/Builder.php index e293a06bf..481da28b2 100644 --- a/DataStorage/Database/Schema/Builder.php +++ b/DataStorage/Database/Schema/Builder.php @@ -86,8 +86,8 @@ class Builder extends QueryBuilder // todo: consider to work with flags instead of all these booleans public function field( - string $name, string $type, $default = null, - bool $isNullable = true, bool $isPrimary = false, bool $autoincrement = false, + string $name, string $type, $default = null, + bool $isNullable = true, bool $isPrimary = false, bool $autoincrement = false, string $foreignTable = null, string $foreignKey = null ) : self { $this->createFields[$name] = [ diff --git a/DataStorage/Database/Schema/Grammar/MysqlGrammar.php b/DataStorage/Database/Schema/Grammar/MysqlGrammar.php index 2be9243cc..c9217c6b6 100644 --- a/DataStorage/Database/Schema/Grammar/MysqlGrammar.php +++ b/DataStorage/Database/Schema/Grammar/MysqlGrammar.php @@ -115,8 +115,8 @@ class MysqlGrammar extends Grammar if (isset($field['foreignTable'], $field['foreignKey']) && !empty($field['foreignTable']) && !empty($field['foreignKey']) ) { - $keys .= ' FOREIGN KEY (' . $this->expressionizeTableColumn([$name], '') . ') REFERENCES ' - . $this->expressionizeTable([$field['foreignTable']], $query->getPrefix()) + $keys .= ' FOREIGN KEY (' . $this->expressionizeTableColumn([$name], '') . ') REFERENCES ' + . $this->expressionizeTable([$field['foreignTable']], $query->getPrefix()) . ' (' . $this->expressionizeTableColumn([$field['foreignKey']], '') . '),'; } } diff --git a/Module/InstallerAbstract.php b/Module/InstallerAbstract.php index 287fc8010..809c336f8 100644 --- a/Module/InstallerAbstract.php +++ b/Module/InstallerAbstract.php @@ -146,7 +146,7 @@ class InstallerAbstract $def['foreignTable'] ?? null, $def['foreignKey'] ?? null ); } - + $builder->execute(); } diff --git a/Module/UninstallerAbstract.php b/Module/UninstallerAbstract.php index a80e3c230..d6b5548f6 100644 --- a/Module/UninstallerAbstract.php +++ b/Module/UninstallerAbstract.php @@ -74,7 +74,7 @@ class UninstallerAbstract foreach ($definitions as $definition) { $builder->dropTable($definition['table'] ?? ''); } - + $builder->execute(); } }