summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2016-01-14 11:35:50 +0000
committerGreg Roach <fisharebest@gmail.com>2016-01-14 11:35:50 +0000
commit88ea75f1990efddfcebacd202a4468fcac94f5e9 (patch)
treeebc236020be8c823432318fb5c91724909314c50
parent89cbc794495b4b7b9eb313abdc8e609cb9a37f9f (diff)
downloadwebtrees-88ea75f1990efddfcebacd202a4468fcac94f5e9.tar.gz
webtrees-88ea75f1990efddfcebacd202a4468fcac94f5e9.tar.bz2
webtrees-88ea75f1990efddfcebacd202a4468fcac94f5e9.zip
Update for MySQL 5.7 with SQL_MODE=full_group_by
-rw-r--r--app/Schema/Migration24.php2
-rw-r--r--app/Schema/Migration27.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/Schema/Migration24.php b/app/Schema/Migration24.php
index 20c515791c..dd0d19af74 100644
--- a/app/Schema/Migration24.php
+++ b/app/Schema/Migration24.php
@@ -28,7 +28,7 @@ class Migration24 implements MigrationInterface {
// Tree settings become site settings
Database::exec(
"INSERT IGNORE INTO `##site_setting` (setting_name, setting_value)" .
- " SELECT setting_name, setting_value" .
+ " SELECT setting_name, MIN(setting_value)" . // Can't use ANY_VALUE() until MySQL5.7
" FROM `##gedcom_setting`" .
" WHERE setting_name IN ('SHOW_REGISTER_CAUTION', 'WELCOME_TEXT_CUST_HEAD') OR setting_name LIKE 'WELCOME_TEXT_AUTH_MODE%'" .
" GROUP BY setting_name"
diff --git a/app/Schema/Migration27.php b/app/Schema/Migration27.php
index 59f65a1d9e..1703020f10 100644
--- a/app/Schema/Migration27.php
+++ b/app/Schema/Migration27.php
@@ -42,7 +42,7 @@ class Migration27 implements MigrationInterface {
// User data may contains duplicates - these will prevent us from creating the new indexes
Database::exec(
- "DELETE t1 FROM `##site_access_rule` AS t1 JOIN (SELECT MIN(site_access_rule_id) AS site_access_rule_id, ip_address_end, ip_address_start, user_agent_pattern FROM `##site_access_rule`) AS t2 ON t1.ip_address_end = t2.ip_address_end AND t1.ip_address_start = t2.ip_address_start AND t1.user_agent_pattern = t2.user_agent_pattern AND t1.site_access_rule_id <> t2.site_access_rule_id"
+ "DELETE t1 FROM `##site_access_rule` AS t1 JOIN `##site_access_rule` AS t2 ON t1.ip_address_end = t2.ip_address_end AND t1.ip_address_start = t2.ip_address_start AND t1.user_agent_pattern = t2.user_agent_pattern AND t1.site_access_rule_id <> t2.site_access_rule_id"
);
// ix1 - covering index for visitor lookup