dev/core#1143 Fix Upgrade tests on MySQL 8 by quoting reserved words
authorSeamus Lee <seamuslee001@gmail.com>
Sun, 5 Jan 2020 20:58:28 +0000 (07:58 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Sun, 5 Jan 2020 20:58:28 +0000 (07:58 +1100)
CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl
CRM/Upgrade/Incremental/sql/4.7.10.mysql.tpl
CRM/Upgrade/Incremental/sql/4.7.25.mysql.tpl
CRM/Upgrade/Incremental/sql/4.7.beta1.mysql.tpl

index d564c44fb7e9851d00263540d4abb5c6614120e4..4da5c51ee89800a7e0edad3dd1a3cf59b629d342 100644 (file)
@@ -9,8 +9,8 @@ VALUES
 SELECT @option_group_id_csgOpt := max(id) FROM civicrm_option_group WHERE name = 'contact_smart_group_display';
 
 INSERT INTO
-civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter,
-is_default, weight)
+civicrm_option_value (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`,
+`is_default`, `weight`)
 VALUES
 (@option_group_id_csgOpt, {localize}'Show Smart Groups on Demand'{/localize}, 1, 'showondemand', NULL, 0, 0, 1),
 (@option_group_id_csgOpt, {localize}'Always Show Smart Groups'{/localize}, 2, 'alwaysshow', NULL, 0, 0, 2),
index 52e04cca5f9dfab2ea9e3faf83bc2644279d211c..fb4220c7555a77759bbe3da3c65b3cc8e5c1a469 100644 (file)
@@ -3,7 +3,7 @@ SELECT @option_group_id_report := max(id) from civicrm_option_group where name =
 SELECT @contributeCompId := max(id) FROM civicrm_component where name = 'CiviContribute';
 SELECT @option_group_id_report_wt  := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_report;
 INSERT INTO
-   civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, visibility_id)
+   civicrm_option_value (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
 VALUES
    (@option_group_id_report, {localize}'{ts escape="sql"}Deferred Revenue Details{/ts}'{/localize}, 'contribute/deferredrevenue', 'CRM_Report_Form_Contribute_DeferredRevenue', NULL, 0, NULL, @option_group_id_report_wt+1, {localize}'{ts escape="sql"}Deferred Revenue Details Report{/ts}'{/localize}, 0, 0, 1, @contributeCompId, NULL);
 
index 7bb3bcebaadd68b4e060e71f8a7a0fe8e6560b94..d6d7aba13beb9b43882f1ceecbe13323c7f86d7d 100644 (file)
@@ -8,7 +8,7 @@ INSERT INTO civicrm_option_group
   (name, {localize field='title'}title{/localize}, is_reserved, is_active) VALUES ('environment', {localize}'{ts escape="sql"}Environment{/ts}'{/localize}, 0, 1);
 
 SELECT @option_group_id_env := max(id) from civicrm_option_group where name = 'environment';
-INSERT INTO civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, visibility_id)
+INSERT INTO civicrm_option_value (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
  VALUES
     (@option_group_id_env, {localize}'{ts escape="sql"}Production{/ts}'{/localize}, 'Production', 'Production', NULL, 0, 1, 1, {localize}'{ts escape="sql"}Production Environment{/ts}'{/localize}, 0, 0, 1, NULL, NULL),
     (@option_group_id_env, {localize}'{ts escape="sql"}Staging{/ts}'{/localize}, 'Staging', 'Staging', NULL, 0, NULL, 2, {localize}'{ts escape="sql"}Staging Environment{/ts}'{/localize}, 0, 0, 1, NULL, NULL),
index 47843e9ecc6a4733b4c13e2d92bc1ec19eb11355..1f3d76106b5dd7ce6c3078ddc8fa8d52876b5a6c 100644 (file)
@@ -4,7 +4,7 @@
 SELECT @option_group_id_report := max(id) from civicrm_option_group where name = 'report_template';
 SELECT @contributeCompId := max(id) FROM civicrm_component where name = 'CiviContribute';
 INSERT INTO
-   civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_reserved, is_active, component_id, visibility_id)
+   civicrm_option_value (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}description{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
 VALUES
    (@option_group_id_report, {localize}'{ts escape="sql"}Recurring Contributions Summary{/ts}'{/localize}, 'contribute/recursummary', 'CRM_Report_Form_Contribute_RecurSummary',               NULL, 0, NULL, 49, {localize}'{ts escape="sql"}Provides simple summary for each payment instrument for which there are recurring contributions (e.g. Credit Card, Standing Order, Direct Debit etc.), showing within a given date range.{/ts}'{/localize}, 0, 0, 1, @contributeCompId, NULL);