From 33d585ae012d957c8baeb0b2e36ccb2e76ed2293 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 22 Mar 2022 08:49:14 -0400 Subject: [PATCH] NFC - cleanup whitespace in sample_custom_data.mysql --- sql/civicrm_sample_custom_data.mysql | 36 +++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/sql/civicrm_sample_custom_data.mysql b/sql/civicrm_sample_custom_data.mysql index c49dd14a83..91abd7b371 100644 --- a/sql/civicrm_sample_custom_data.mysql +++ b/sql/civicrm_sample_custom_data.mysql @@ -18,7 +18,8 @@ -- * create custom group -- * -- *******************************************************/ -INSERT INTO `civicrm_custom_group` (`name`, `title`, `extends`, `style`, `collapse_display`, `help_pre`, `weight`, `is_active`, `table_name`, `is_multiple`) VALUES ( 'constituent_information', 'Constituent Information', 'Individual', 'Inline', 1, 'Please enter additional constituent information as data becomes available for this contact.', 1, 1,'civicrm_value_constituent_information_1', 0); +INSERT INTO `civicrm_custom_group` (`name`, `title`, `extends`, `style`, `collapse_display`, `help_pre`, `weight`, `is_active`, `table_name`, `is_multiple`) +VALUES ( 'constituent_information', 'Constituent Information', 'Individual', 'Inline', 1, 'Please enter additional constituent information as data becomes available for this contact.', 1, 1,'civicrm_value_constituent_information_1', 0); @@ -27,7 +28,9 @@ INSERT INTO `civicrm_custom_group` (`name`, `title`, `extends`, `style`, `collap -- * create option group for storing custom options for custom fields -- * -- *******************************************************/ -INSERT INTO `civicrm_option_group` (`name`, `title`, `is_reserved`, `is_active`) VALUES ('custom_most_important_issue', 'Most Important Issue', 0, 1), ( 'custom_marital_status', 'Marital Status', 1, 1); +INSERT INTO `civicrm_option_group` (`name`, `title`, `is_reserved`, `is_active`) +VALUES ('custom_most_important_issue', 'Most Important Issue', 0, 1), + ( 'custom_marital_status', 'Marital Status', 1, 1); SELECT @option_most_id := max(id) from civicrm_option_group where name = 'custom_most_important_issue'; SELECT @option_marital_id := max(id) from civicrm_option_group where name = 'custom_marital_status'; @@ -39,7 +42,15 @@ SELECT @option_marital_id := max(id) from civicrm_option_group where name = 'cus -- * create option values (custom options for custom fields) -- * -- *******************************************************/ -INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `weight`, `is_active`, `is_default`) VALUES (@option_most_id , 'Education', 'Edu', 1, 1,0), (@option_most_id , 'Environment', 'Env', 2, 1,0), (@option_most_id , 'Social Justice', 'SocJus', 3, 1,0),(@option_marital_id, 'Single', 'S', 1, 1,0),(@option_marital_id, 'Married', 'M', 2, 1,0), (@option_marital_id, 'Domestic Partner', 'D', 3, 1,0), (@option_marital_id, 'Widowed', 'W', 4, 1,0), (@option_marital_id, 'Other', 'O', 5, 1,0); +INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `weight`, `is_active`, `is_default`) + VALUES (@option_most_id , 'Education', 'Edu', 1, 1,0), + (@option_most_id , 'Environment', 'Env', 2, 1,0), + (@option_most_id , 'Social Justice', 'SocJus', 3, 1,0), + (@option_marital_id, 'Single', 'S', 1, 1,0), + (@option_marital_id, 'Married', 'M', 2, 1,0), + (@option_marital_id, 'Domestic Partner', 'D', 3, 1,0), + (@option_marital_id, 'Widowed', 'W', 4, 1,0), + (@option_marital_id, 'Other', 'O', 5, 1,0); -- /******************************************************* @@ -47,7 +58,10 @@ INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `weight -- * create custom field -- * -- *******************************************************/ -INSERT INTO `civicrm_custom_field` (`custom_group_id`, `name`, `label`, `data_type`, `html_type`, `text_length`, `is_required`, `weight`, `help_post`, `is_active`, `is_view`, `is_searchable`, `options_per_line`, `column_name`, `option_group_id`, `start_date_years`, `end_date_years`, `date_format`, `time_format` ) VALUES (1, 'Most_Important_Issue', 'Most Important Issue', 'String', 'Radio', 255, 0, 1, '', 1, 0, 1, NULL, 'most_important_issue_1', @option_most_id, NULL, NULL, NULL, NULL), (1, 'Marital_Status', 'Marital Status', 'String', 'Select', 255, 0, 2, '', 1, 0, 1, NULL, 'marital_status_2', @option_marital_id, NULL, NULL, NULL, NULL), (1, 'Marriage_Date', 'Marriage Date', 'Date', 'Select Date', NULL, 0, 3, '', 1, 0, 1, NULL, 'marriage_date_3', NULL, 30, 0, 'mm/dd/yy', 0); +INSERT INTO `civicrm_custom_field` (`custom_group_id`, `name`, `label`, `data_type`, `html_type`, `text_length`, `is_required`, `weight`, `help_post`, `is_active`, `is_view`, `is_searchable`, `options_per_line`, `column_name`, `option_group_id`, `start_date_years`, `end_date_years`, `date_format`, `time_format` ) + VALUES (1, 'Most_Important_Issue', 'Most Important Issue', 'String', 'Radio', 255, 0, 1, '', 1, 0, 1, NULL, 'most_important_issue_1', @option_most_id, NULL, NULL, NULL, NULL), + (1, 'Marital_Status', 'Marital Status', 'String', 'Select', 255, 0, 2, '', 1, 0, 1, NULL, 'marital_status_2', @option_marital_id, NULL, NULL, NULL, NULL), + (1, 'Marriage_Date', 'Marriage Date', 'Date', 'Select Date', NULL, 0, 3, '', 1, 0, 1, NULL, 'marriage_date_3', NULL, 30, 0, 'mm/dd/yy', 0); -- /******************************************************* @@ -62,7 +76,8 @@ CREATE TABLE `civicrm_value_constituent_information_1` (`id` int(10) unsigned NO -- Fall Fundraiser Dinner participants’ custom data -INSERT INTO `civicrm_option_group` (`name`, `title`, `is_reserved`, `is_active`) VALUES ('soup_selection', 'Soup Selection', 0, 1); +INSERT INTO `civicrm_option_group` (`name`, `title`, `is_reserved`, `is_active`) + VALUES ('soup_selection', 'Soup Selection', 0, 1); SELECT @ogid := MAX(id) FROM civicrm_option_group; INSERT INTO civicrm_custom_group ( name, title, extends, extends_entity_column_id, extends_entity_column_value, style, is_active, table_name) VALUES ('Food_Preference', 'Food Preference', 'Participant', 2, '1', 'Inline', 1, 'civicrm_value_food_preference_2'); @@ -70,18 +85,23 @@ SELECT @cgid := MAX(id) FROM civicrm_custom_group; INSERT INTO civicrm_custom_field ( custom_group_id, label, name, data_type, html_type, is_active, text_length, note_columns, note_rows, column_name, option_group_id, is_searchable ) VALUES ( @cgid, 'Soup Selection', 'Soup_Selection', 'String', 'Radio', 1, 255, 60, 4, 'soup_selection_4', @ogid, 1); -INSERT INTO civicrm_option_value ( option_group_id, label, value, name, weight ) VALUES ( @ogid, 'Bean Broth', 'bean', 'Bean_Broth', 1 ), ( @ogid, 'Chicken Combo', 'chicken', 'Chicken_Combo', 2), ( @ogid, 'Salmon Stew', 'salmon', 'Salmon_Stew', 3); +INSERT INTO civicrm_option_value ( option_group_id, label, value, name, weight ) + VALUES ( @ogid, 'Bean Broth', 'bean', 'Bean_Broth', 1 ), + ( @ogid, 'Chicken Combo', 'chicken', 'Chicken_Combo', 2), + ( @ogid, 'Salmon Stew', 'salmon', 'Salmon_Stew', 3); DROP TABLE IF EXISTS `civicrm_value_food_preference_2`; CREATE TABLE civicrm_value_food_preference_2 ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Default MySQL primary key', entity_id INT(10) UNSIGNED NOT NULL COMMENT 'Table that this extends', soup_selection_4 VARCHAR(255) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY unique_entity_id (entity_id), CONSTRAINT `FK_civicrm_value_food_preference_2_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_participant` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -- Donors’ custom data -INSERT INTO `civicrm_custom_group` (`name`, `title`, `extends`, `extends_entity_column_id`, `extends_entity_column_value`, `style`, `is_active`, `table_name`) VALUES ('Donor_Information', 'Donor Information', 'Contribution', NULL, NULL, 'Inline', 1, 'civicrm_value_donor_information_3'); +INSERT INTO `civicrm_custom_group` (`name`, `title`, `extends`, `extends_entity_column_id`, `extends_entity_column_value`, `style`, `is_active`, `table_name`) + VALUES ('Donor_Information', 'Donor Information', 'Contribution', NULL, NULL, 'Inline', 1, 'civicrm_value_donor_information_3'); SELECT @cgid_contribution := MAX(id) FROM civicrm_custom_group; -INSERT INTO `civicrm_option_group` (`name`, `title`, `is_reserved`, `is_active`) VALUES ('how_long_have_you_been_a_donor', 'How long have you been a donor?', 0, 1); +INSERT INTO `civicrm_option_group` (`name`, `title`, `is_reserved`, `is_active`) + VALUES ('how_long_have_you_been_a_donor', 'How long have you been a donor?', 0, 1); SELECT @ogid_contribution := MAX(id) FROM civicrm_option_group; -- 2.25.1