Commit | Line | Data |
---|---|---|
07a5aff4 | 1 | {* file to handle db changes in 4.6.5 during upgrade *} |
4bb94be4 TO |
2 | |
3 | -- CRM-16173 | |
c6556e0a | 4 | CREATE TABLE IF NOT EXISTS `civicrm_cxn` ( |
4bb94be4 TO |
5 | `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Connection ID', |
6 | `app_guid` varchar(128) COMMENT 'Application GUID', | |
7 | `app_meta` text COMMENT 'Application Metadata (JSON)', | |
8 | `cxn_guid` varchar(128) COMMENT 'Connection GUID', | |
9 | `secret` text COMMENT 'Shared secret', | |
10 | `perm` text COMMENT 'Permissions approved for the service (JSON)', | |
11 | `options` text COMMENT 'Options for the service (JSON)', | |
12 | `is_active` tinyint DEFAULT 1 COMMENT 'Is connection currently enabled?', | |
13 | `created_date` timestamp NULL DEFAULT NULL COMMENT 'When was the connection was created.', | |
14 | `modified_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When the connection was created or modified.', | |
15 | `fetched_date` timestamp NULL DEFAULT NULL COMMENT 'The last time the application metadata was fetched.' , | |
16 | PRIMARY KEY ( `id` ) | |
17 | , UNIQUE INDEX `UI_appid`( | |
18 | app_guid | |
19 | ) | |
20 | , UNIQUE INDEX `UI_keypair_cxnid`( | |
21 | cxn_guid | |
22 | ) | |
23 | ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ; | |
24 | ||
20d1bd78 EM |
25 | -- CRM-16417 add failed payment activity type |
26 | SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type'; | |
27 | SELECT @option_group_id_act_wt := MAX(weight) FROM civicrm_option_value WHERE option_group_id = @option_group_id_act; | |
28 | SELECT @option_group_id_act_val := MAX(ROUND(value)) FROM civicrm_option_value WHERE option_group_id = @option_group_id_act; | |
29 | SELECT @contributeCompId := max(id) FROM civicrm_component where name = 'CiviContribute'; | |
30 | ||
31 | INSERT INTO | |
32 | `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`) | |
33 | VALUES | |
34 | (@option_group_id_act, {localize}'{ts escape="sql"}Failed Payment{/ts}'{/localize}, @option_group_id_act_val+1, | |
35 | 'Failed Payment', NULL, 1, NULL, @option_group_id_act_wt+1, {localize}'{ts escape="sql"}Failed payment.{/ts}'{/localize}, 0, 1, 1, @contributeCompId, NULL); |