diff options
author | Simon Rettberg | 2019-10-31 16:39:04 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-10-31 16:39:04 +0100 |
commit | 2c7b126f144ea55c6e8a9484397d8e67eba170ee (patch) | |
tree | d7cecece7d904d01b996bd0b9de4fec82cc72925 | |
parent | [statistics] Silence notice about undefined array index (diff) | |
download | slx-admin-2c7b126f144ea55c6e8a9484397d8e67eba170ee.tar.gz slx-admin-2c7b126f144ea55c6e8a9484397d8e67eba170ee.tar.xz slx-admin-2c7b126f144ea55c6e8a9484397d8e67eba170ee.zip |
install.php: Workaround for MariaDB on Debian 10
-rw-r--r-- | install.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/install.php b/install.php index 38cc3a1e..e566b5a4 100644 --- a/install.php +++ b/install.php @@ -137,7 +137,10 @@ function tableGetConstraints($table, $column, $refTable, $refColumn) } return Database::queryFirst('SELECT b.CONSTRAINT_NAME, b.UPDATE_RULE, b.DELETE_RULE FROM information_schema.KEY_COLUMN_USAGE a - INNER JOIN information_schema.REFERENTIAL_CONSTRAINTS b USING (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME) + INNER JOIN information_schema.REFERENTIAL_CONSTRAINTS b ON ( + a.CONSTRAINT_CATALOG = b.CONSTRAINT_CATALOG + AND a.CONSTRAINT_SCHEMA = b.CONSTRAINT_SCHEMA + AND a.CONSTRAINT_NAME = b.CONSTRAINT_NAME) WHERE a.TABLE_SCHEMA = :db AND a.TABLE_NAME = :table AND a.COLUMN_NAME = :column AND a.REFERENCED_TABLE_NAME = :refTable AND a.REFERENCED_COLUMN_NAME = :refColumn', compact('db', 'table', 'column', 'refTable', 'refColumn')); |