Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | --CRM-6455 |
2 | SELECT @domainID := MIN(id) FROM civicrm_domain; | |
3 | SELECT @option_group_id_editor := MAX(id) from civicrm_option_group where name = 'wysiwyg_editor'; | |
4 | SELECT @max_value := MAX(ROUND(value)) from civicrm_option_value where option_group_id = @option_group_id_editor; | |
5 | SELECT @max_weight := MAX(ROUND(weight)) from civicrm_option_value where option_group_id = @option_group_id_editor; | |
6 | ||
7 | INSERT INTO civicrm_option_value | |
8 | ( 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, domain_id, visibility_id ) | |
9 | VALUES | |
10824d34 | 10 | ( @option_group_id_editor, {localize}'Joomla Default Editor'{/localize}, @max_value+1, NULL, NULL, 0, NULL, @max_weight+1, {localize}NULL{/localize}, 0, 1, 1, NULL, @domainID, NULL ); |
6a488035 TO |
11 | |
12 | -- CRM-6846 | |
10824d34 | 13 | CREATE TABLE `civicrm_price_field_value` |
6a488035 TO |
14 | (`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Price Field Value', |
15 | `price_field_id` int(10) unsigned NOT NULL COMMENT 'FK to civicrm_price_field', | |
16 | `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Price field option name', | |
17 | {localize field='label'}`label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Price field option label'{/localize}, | |
18 | {localize field='description'}`description` text COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Price field option description.'{/localize}, | |
19 | `amount` varchar(512) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Price field option amount', | |
20 | `count` int(10) unsigned DEFAULT NULL COMMENT 'Number of participants per field option', | |
21 | `max_value` int(10) unsigned DEFAULT NULL COMMENT 'Max number of participants per field options', | |
22 | `weight` int(11) DEFAULT '1' COMMENT 'Order in which the field options should appear', | |
23 | `is_default` tinyint(4) DEFAULT '0' COMMENT 'Is this default price field option', | |
24 | `is_active` tinyint(4) DEFAULT '1' COMMENT 'Is this price field option active', | |
25 | PRIMARY KEY (`id`), | |
26 | CONSTRAINT `FK_civicrm_price_field_value_price_field_id` FOREIGN KEY (`price_field_id`) REFERENCES civicrm_price_field(id) ON DELETE CASCADE )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
27 | ||
28 | --CRM-7003 | |
29 | ALTER TABLE `civicrm_uf_match` ADD INDEX `I_civicrm_uf_match_uf_id`(`uf_id`); | |
30 | ||
31 | --CRM-4572 | |
32 | SELECT @uf_group_id_sharedAddress := max(id) from civicrm_uf_group where name = 'shared_address'; | |
33 | UPDATE civicrm_uf_field | |
34 | SET {localize field='help_post'} help_post = NULL {/localize} | |
35 | WHERE civicrm_uf_field.uf_group_id = @uf_group_id_sharedAddress AND civicrm_uf_field.field_name= 'country'; | |
36 | ||
37 | --CRM-7031 | |
10824d34 | 38 | ALTER TABLE `civicrm_participant` |
6a488035 TO |
39 | CHANGE `fee_currency` `fee_currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value derived from config setting.'; |
40 | ||
10824d34 | 41 | ALTER TABLE `civicrm_contribution` |
6a488035 TO |
42 | CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; |
43 | ||
10824d34 | 44 | ALTER TABLE `civicrm_grant` |
6a488035 TO |
45 | CHANGE `currency` `currency` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; |
46 | ||
10824d34 | 47 | ALTER TABLE `civicrm_pcp` |
6a488035 TO |
48 | CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; |
49 | ||
10824d34 | 50 | ALTER TABLE `civicrm_pledge` |
6a488035 | 51 | CHANGE `currency` `currency` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '3 character string, value from config setting or input via user.'; |
10824d34 | 52 | |
6a488035 TO |
53 | -- insert civimail settings into nav menu |
54 | SELECT @domainID := MIN(id) FROM civicrm_domain; | |
55 | SELECT @nav_civimailadmin_id := id FROM civicrm_navigation WHERE name = 'CiviMail'; | |
56 | SELECT @nav_civimailadmin_wt := MAX(ROUND(weight)) from civicrm_navigation WHERE parent_id = @nav_civimailadmin_id; | |
57 | ||
58 | INSERT INTO civicrm_navigation | |
59 | ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) | |
60 | VALUES | |
61 | ( @domainID, 'civicrm/admin/mail&reset=1', '{ts escape="sql"}Mailer Settings{/ts}', 'Mailer Settings', 'access CiviMail,administer CiviCRM', 'AND', @nav_civimailadmin_id, '1', NULL, @nav_civimailadmin_wt + 1 ); | |
10824d34 | 62 | |
6a488035 TO |
63 | -- update petition system workflow message templates |
64 | {include file='../CRM/Upgrade/3.3.beta1.msg_template/civicrm_msg_template.tpl'} | |
10824d34 | 65 | |
6a488035 | 66 | -- CRM-6231 -tweak permissions. |
10824d34 | 67 | UPDATE civicrm_navigation |
6a488035 TO |
68 | SET permission = CONCAT( permission, ',manage campaign' ), |
69 | permission_operator = 'OR' | |
70 | WHERE name in ( 'Dashboard', 'Survey Dashboard', 'Petition Dashboard', 'Campaign Dashboard', 'New Campaign', 'New Survey', 'New Petition' ) | |
71 | AND permission = 'administer CiviCampaign'; | |
72 | ||
73 | -- replace voter w/ respondent. | |
74 | UPDATE civicrm_navigation | |
75 | SET label = REPLACE(label, 'Voter', 'Respondent' ), | |
76 | name = REPLACE(name, 'Voter', 'Respondent' ) | |
77 | WHERE name IN ( 'Reserve Voters', 'Interview Voters', 'Release Voters' ); | |
78 | ||
79 | ||
80 | SELECT @campaignTypeOptGrpID := MAX(id) from civicrm_option_group where name = 'campaign_type'; | |
81 | ||
82 | UPDATE civicrm_option_value | |
83 | SET {localize field='label'}label = REPLACE(label, 'Voter', 'Constituent' ){/localize}, | |
10824d34 | 84 | name = REPLACE(name, 'Voter', 'Constituent' ) |
6a488035 TO |
85 | WHERE name = 'Voter Engagement' |
86 | AND option_group_id = @campaignTypeOptGrpID; | |
87 | ||
10824d34 | 88 | UPDATE civicrm_navigation |
6a488035 TO |
89 | SET permission = CONCAT( permission, ',release campaign contacts' ) |
90 | WHERE name like 'Voter Listing' | |
91 | AND permission = 'administer CiviCampaign,manage campaign'; | |
92 | ||
93 | ||
94 | {if $multilingual} | |
95 | {foreach from=$locales item=loc} | |
96 | ALTER TABLE civicrm_batch ADD label_{$loc} varchar(64); | |
97 | ALTER TABLE civicrm_batch ADD description_{$loc} text; | |
98 | ||
99 | UPDATE civicrm_batch SET label_{$loc} = label; | |
100 | UPDATE civicrm_batch SET description_{$loc} = description; | |
101 | {/foreach} | |
102 | ALTER TABLE civicrm_batch DROP label; | |
103 | ALTER TABLE civicrm_batch DROP description; | |
104 | {/if} | |
105 | ||
106 | -- CRM-7044 (needed for the installs that upgraded to 3.3 from pre-3.2.5) | |
107 | UPDATE civicrm_state_province SET name = 'Khomas' WHERE name = 'Khomae'; | |
108 |