First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,87 @@
-- /**********************************************************************
-- *
-- * Configuration Data for CiviCase Component
-- * For: Sample Case Types - Housing Support and Adult Day Care Referral
-- *
-- **********************************************************************/
SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase';
-- /*******************************************************
-- *
-- * Case Types
-- *
-- *******************************************************/
SELECT @max_wt := COALESCE( max(weight), 0 ) from civicrm_case_type;
INSERT IGNORE INTO `civicrm_case_type` ( `title`, `name`, `description`, `weight`, `is_reserved`, `is_active`) VALUES
('Housing Support', 'housing_support', 'Help homeless individuals obtain temporary and long-term housing', @max_wt + 1, 0, 1),
('Adult Day Care Referral', 'adult_day_care_referral', 'Arranging adult day care for senior individuals', @max_wt + 2, 0, 1);
-- /*******************************************************
-- *
-- * Case Status - Set names for Open and Closed
-- *
-- *******************************************************/
SELECT @csgId := max(id) from civicrm_option_group where name = 'case_status';
UPDATE civicrm_option_value SET name = 'Open' where option_group_id = @csgId AND label = 'Ongoing';
UPDATE civicrm_option_value SET name = 'Closed' where option_group_id = @csgId AND label = 'Resolved';
-- /*******************************************************
-- *
-- * Activity Types
-- *
-- *******************************************************/
SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, 'Medical evaluation', (SELECT @max_val := @max_val+1), 'Medical evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Medical evaluation'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, 'Mental health evaluation', (SELECT @max_val := @max_val+1), 'Mental health evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Mental health evaluation'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, 'Secure temporary housing', (SELECT @max_val := @max_val+1), 'Secure temporary housing', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Secure temporary housing'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, 'Income and benefits stabilization', (SELECT @max_val := @max_val+1), 'Income and benefits stabilization', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Income and benefits stabilization'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, 'Long-term housing plan', (SELECT @max_val := @max_val+1), 'Long-term housing plan', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Long-term housing plan'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, 'ADC referral', (SELECT @max_val := @max_val+1), 'ADC referral', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'ADC referral'));
-- /*******************************************************
-- *
-- * Relationship Types
-- *
-- *******************************************************/
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, `label_a_b`, `name_b_a`, `label_b_a`, `description`, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (SELECT 'Homeless Services Coordinator is', 'Homeless Services Coordinator is', 'Homeless Services Coordinator', 'Homeless Services Coordinator', 'Homeless Services Coordinator', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Homeless Services Coordinator is'));
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, `label_a_b`, `name_b_a`, `label_b_a`, `description`, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (
SELECT 'Health Services Coordinator is', 'Health Services Coordinator is', 'Health Services Coordinator', 'Health Services Coordinator', 'Health Services Coordinator', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Health Services Coordinator is'));
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, `label_a_b`, `name_b_a`, `label_b_a`, `description`, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (
SELECT 'Senior Services Coordinator is', 'Senior Services Coordinator is', 'Senior Services Coordinator', 'Senior Services Coordinator', 'Senior Services Coordinator', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Senior Services Coordinator is'));
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, `label_a_b`, `name_b_a`, `label_b_a`, `description`, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (
SELECT 'Benefits Specialist is', 'Benefits Specialist is', 'Benefits Specialist', 'Benefits Specialist', 'Benefits Specialist', 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Benefits Specialist is'));
-- /*******************************************************
-- *
-- * Case Resources Group
-- *
-- *******************************************************/
INSERT INTO `civicrm_group` ( `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `parents`, `children`, `is_hidden` ) (SELECT 'Case_Resources', 'Case Resources', 'Contacts in this group are listed with their phone number and email when viewing case. You also can send copies of case activities to these contacts.', NULL, NULL, 1, 'User and User Admin Only', ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', 'a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";s:6:"gender";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}', '2', NULL, NULL, NULL, 0 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_group` WHERE `name` = 'Case_Resources'));

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,106 @@
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from civicrm_acl.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
--
-- sample acl entries
-- Create ACL to edit and view contacts in all groups
INSERT INTO civicrm_acl (name, deny, entity_table, entity_id, operation, object_table, object_id, acl_table, acl_id, is_active)
VALUES
('Edit All Contacts', 0, 'civicrm_acl_role', 1, 'Edit', 'civicrm_saved_search', 0, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access all custom data', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'view event info', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'register for events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviCRM', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviContribute', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviEvent', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMail', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMember', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviPledge', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer CiviCase', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access my cases and activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access all cases and activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviCase', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviGrant', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access Contact Dashboard', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer Multiple Organizations', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviContribute', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviMail', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviPledge', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviEvent', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviMember', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'translate CiviCRM', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit grants', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access all custom data', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access uploaded files', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'add contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer CiviCRM', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit all contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit event participants', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit groups', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit memberships', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviReport', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access Report Criteria', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer Reports', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'import contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'make online contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'make online pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile create', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile edit', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile listings', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile view', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'register for events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view all activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view all contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view event info', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view event participants', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit all events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'access all custom data', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'make online contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'make online pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'register for events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'view event info', NULL, NULL, NULL, 1);
-- Create default Groups for User Permissioning
INSERT INTO civicrm_group (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `group_type`) VALUES (1, 'Administrators', 'Administrators', 'Contacts in this group are assigned Administrator role permissions.', NULL, NULL, 1, 'User and User Admin Only', '1');
-- Assign above Group (entity) to the Administrator Role
INSERT INTO civicrm_acl_entity_role
(`acl_role_id`, `entity_table`, `entity_id`, `is_active`)
VALUES
(1, 'civicrm_group', 1, 1);

View file

@ -0,0 +1,77 @@
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
INSERT INTO
civicrm_option_group (name, description, is_reserved, is_active)
VALUES
('f1_case_type' , 'Case Type' , 1, 1),
('f1_case_sub_type' , 'Case Sub Type' , 1, 1),
('f1_case_violation' , 'Violation Type' , 1, 1),
('case_activity_type' , 'Type' , 1, 1),
('communication_medium' , 'Communication Medium' , 1, 1);
SELECT @option_group_id_case_type := max(id) from civicrm_option_group where name = 'f1_case_type';
SELECT @option_group_id_case_stype := max(id) from civicrm_option_group where name = 'f1_case_sub_type';
SELECT @option_group_id_case_viol := max(id) from civicrm_option_group where name = 'f1_case_violation';
SELECT @option_group_id_case_atype := max(id) from civicrm_option_group where name = 'case_activity_type';
SELECT @option_group_id_case_comm := max(id) from civicrm_option_group where name = 'communication_medium';
INSERT INTO
`civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
VALUES
(@option_group_id_case_type, 'Civil & Political' , 1, NULL, NULL, 0, 1, 1, NULL, 0, 1, 1),
(@option_group_id_case_type, 'Economic, Social & Cultural', 2, NULL, NULL, 0, 0, 2, NULL, 0, 1, 1),
(@option_group_id_case_type, 'Gender Issues' , 3, NULL, NULL, 0, 0, 3, NULL, 0, 1, 1),
(@option_group_id_case_stype,'Labour Rights' , 1, NULL, NULL, 0, 1, 1, NULL, 0, 1, 1),
(@option_group_id_case_stype,'Land Rights' , 2, NULL, NULL, 0, 0, 2, NULL, 0, 1, 1),
(@option_group_id_case_stype,'LGTB Rights' , 3, NULL, NULL, 0, 0, 3, NULL, 0, 1, 1),
(@option_group_id_case_stype,'State Corruption' , 4, NULL, NULL, 0, 0, 4, NULL, 0, 1, 1),
(@option_group_id_case_stype,'Working with IDPs' , 5, NULL, NULL, 0, 0, 5, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Arrested / Detained' , 1, NULL, NULL, 0, 1, 1, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Disappeared' , 2, NULL, NULL, 0, 0, 2, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Harassment' , 3, NULL, NULL, 0, 0, 3, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Killed' , 4, NULL, NULL, 0, 0, 4, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Legal Action' , 5, NULL, NULL, 0, 0, 5, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Threats' , 6, NULL, NULL, 0, 0, 6, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Tortured / Ill-treatment' , 7, NULL, NULL, 0, 0, 7, NULL, 0, 1, 1),
(@option_group_id_case_viol, 'Violence Against Women' , 8, NULL, NULL, 0, 0, 8, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Source(incoming)' , 1, NULL, NULL, 0, 1, 1, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Incoming correspondence' , 2, NULL, NULL, 0, 0, 2, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Incoming Press Release' , 3, NULL, NULL, 0, 0, 3, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Complaint' , 4, NULL, NULL, 0, 0, 4, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Urgent Action(incoming)' , 5, NULL, NULL, 0, 0, 5, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Outgoing correspondence' , 6, NULL, NULL, 0, 0, 6, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Outgoing Press Release' , 7, NULL, NULL, 0, 0, 7, NULL, 0, 1, 1),
(@option_group_id_case_atype,'FL Action(outgoing)' , 8, NULL, NULL, 0, 0, 8, NULL, 0, 1, 1),
(@option_group_id_case_atype,'FL Urgent Action(outgoing)' , 9, NULL, NULL, 0, 0, 9, NULL, 0, 1, 1),
(@option_group_id_case_atype,'Lobbying(outgoing)' , 10, NULL, NULL, 0, 0, 10, NULL, 0, 1, 1),
(@option_group_id_case_comm ,'E-mail' , 1, NULL, NULL, 0, 1, 1, NULL, 0, 1, 1),
(@option_group_id_case_comm ,'Fax' , 2, NULL, NULL, 0, 0, 2, NULL, 0, 1, 1),
(@option_group_id_case_comm ,'Letter' , 3, NULL, NULL, 0, 0, 3, NULL, 0, 1, 1),
(@option_group_id_case_comm ,'Meeting' , 4, NULL, NULL, 0, 0, 4, NULL, 0, 1, 1),
(@option_group_id_case_comm ,'SMS Message' , 5, NULL, NULL, 0, 0, 5, NULL, 0, 1, 1),
(@option_group_id_case_comm ,'Telephone' , 6, NULL, NULL, 0, 0, 6, NULL, 0, 1, 1),
(@option_group_id_case_comm ,'Video Conference' , 7, NULL, NULL, 0, 0, 7, NULL, 0, 1, 1);

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,40 @@
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
-- This script instantiates a PayPal Pro payment processor and assigns it to all existing contribution pages
-- and events for a demo or test site. The processor setup uses a valid test account and a fake live account.
-- This script also sets Outbound Email preferences to SMTP, localhost, port 25
-- This script should be run after sample data is loaded (civicrm_generated.mysql).
SELECT @ppTypeID := id FROM civicrm_payment_processor_type WHERE name = 'PayPal';
INSERT INTO `civicrm_payment_processor` (`id`, `name`, `description`, `payment_processor_type_id`, `is_active`, `is_default`, `is_test`, `user_name`, `password`, `signature`, `url_site`, `url_api`, `url_recur`, `url_button`, `subject`, `class_name`, `billing_mode`, `is_recur`, `domain_id`) VALUES (3, 'PP Pro', '', @ppTypeID, 1, 1, 0, 'xxx', 'yyy', 'zzz', 'https://www.paypal.com/', 'https://api-3t.paypal.com/', NULL, 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', NULL, 'Payment_PayPalImpl', 3, 1, 1);
INSERT INTO `civicrm_payment_processor` (`id`, `name`, `description`, `payment_processor_type_id`, `is_active`, `is_default`, `is_test`, `user_name`, `password`, `signature`, `url_site`, `url_api`, `url_recur`, `url_button`, `subject`, `class_name`, `billing_mode`, `is_recur`, `domain_id`) VALUES (4, 'PP Pro', '', @ppTypeID, 1, 0, 1, 'dave_api1.northtower.com', 'S5YW42RS7WRWT9AD', 'AUsrQDMAfRs6zQSEYuw3M4QDuTBHAAvpXf7N0jYi8G1UCfKRI2NrvWVM', 'https://www.sandbox.paypal.com/', 'https://api-3t.sandbox.paypal.com/', NULL, 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', NULL, 'Payment_PayPalImpl', 3, 1, 1);
SET @pp := LAST_INSERT_ID();
UPDATE `civicrm_contribution_page`
SET payment_processor = @pp;
UPDATE `civicrm_event`
SET payment_processor = @pp;

View file

@ -0,0 +1,31 @@
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
SELECT @domainId := MAX(id) FROM civicrm_domain;
INSERT INTO civicrm_payment_processor
(domain_id, name, payment_processor_type, is_active, is_default, is_test, user_name, class_name, billing_mode) VALUES
(@domainId, 'dummy', 'Dummy', 1, 1, 0, 'dummy', 'Payment_Dummy', 1),
(@domainId, 'dummy', 'Dummy', 1, 0, 1, 'dummy', 'Payment_Dummy', 1);
UPDATE civicrm_preferences SET mailing_backend = 'a:4:{s:15:\"outBound_option\";s:1:\"0\";s:10:\"smtpServer\";s:9:\"localhost\";s:8:\"smtpPort\";s:2:\"25\";s:8:\"smtpAuth\";s:1:\"0\";}';

View file

@ -0,0 +1,189 @@
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from drop.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
--
-- /*******************************************************
-- *
-- * Clean up the exisiting tables
-- *
-- *******************************************************/
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `civicrm_line_item`;
DROP TABLE IF EXISTS `civicrm_pledge_payment`;
DROP TABLE IF EXISTS `civicrm_events_in_carts`;
DROP TABLE IF EXISTS `civicrm_participant_payment`;
DROP TABLE IF EXISTS `civicrm_participant`;
DROP TABLE IF EXISTS `civicrm_event`;
DROP TABLE IF EXISTS `civicrm_membership_payment`;
DROP TABLE IF EXISTS `civicrm_entity_financial_trxn`;
DROP TABLE IF EXISTS `civicrm_contribution_soft`;
DROP TABLE IF EXISTS `civicrm_contribution_product`;
DROP TABLE IF EXISTS `civicrm_contribution`;
DROP TABLE IF EXISTS `civicrm_group_contact`;
DROP TABLE IF EXISTS `civicrm_loc_block`;
DROP TABLE IF EXISTS `civicrm_address`;
DROP TABLE IF EXISTS `civicrm_pcp_block`;
DROP TABLE IF EXISTS `civicrm_price_field_value`;
DROP TABLE IF EXISTS `civicrm_price_field`;
DROP TABLE IF EXISTS `civicrm_case_activity`;
DROP TABLE IF EXISTS `civicrm_activity_contact`;
DROP TABLE IF EXISTS `civicrm_activity`;
DROP TABLE IF EXISTS `civicrm_membership_log`;
DROP TABLE IF EXISTS `civicrm_membership`;
DROP TABLE IF EXISTS `civicrm_financial_trxn`;
DROP TABLE IF EXISTS `civicrm_contribution_recur`;
DROP TABLE IF EXISTS `civicrm_mailing_event_unsubscribe`;
DROP TABLE IF EXISTS `civicrm_mailing_event_trackable_url_open`;
DROP TABLE IF EXISTS `civicrm_mailing_event_reply`;
DROP TABLE IF EXISTS `civicrm_mailing_event_opened`;
DROP TABLE IF EXISTS `civicrm_mailing_event_forward`;
DROP TABLE IF EXISTS `civicrm_mailing_event_delivered`;
DROP TABLE IF EXISTS `civicrm_mailing_event_bounce`;
DROP TABLE IF EXISTS `civicrm_mailing_event_queue`;
DROP TABLE IF EXISTS `civicrm_mailing_spool`;
DROP TABLE IF EXISTS `civicrm_mailing_recipients`;
DROP TABLE IF EXISTS `civicrm_mailing_job`;
DROP TABLE IF EXISTS `civicrm_mailing_trackable_url`;
DROP TABLE IF EXISTS `civicrm_mailing_group`;
DROP TABLE IF EXISTS `civicrm_mailing`;
DROP TABLE IF EXISTS `civicrm_relationship`;
DROP TABLE IF EXISTS `civicrm_dashboard_contact`;
DROP TABLE IF EXISTS `civicrm_action_log`;
DROP TABLE IF EXISTS `civicrm_action_schedule`;
DROP TABLE IF EXISTS `civicrm_uf_join`;
DROP TABLE IF EXISTS `civicrm_uf_field`;
DROP TABLE IF EXISTS `civicrm_uf_group`;
DROP TABLE IF EXISTS `civicrm_entity_tag`;
DROP TABLE IF EXISTS `civicrm_discount`;
DROP TABLE IF EXISTS `civicrm_dashboard`;
DROP TABLE IF EXISTS `civicrm_county`;
DROP TABLE IF EXISTS `civicrm_price_set_entity`;
DROP TABLE IF EXISTS `civicrm_price_set`;
DROP TABLE IF EXISTS `civicrm_report_instance`;
DROP TABLE IF EXISTS `civicrm_pledge`;
DROP TABLE IF EXISTS `civicrm_case_contact`;
DROP TABLE IF EXISTS `civicrm_case`;
DROP TABLE IF EXISTS `civicrm_membership_block`;
DROP TABLE IF EXISTS `civicrm_membership_type`;
DROP TABLE IF EXISTS `civicrm_sms_provider`;
DROP TABLE IF EXISTS `civicrm_payment_token`;
DROP TABLE IF EXISTS `civicrm_payment_processor`;
DROP TABLE IF EXISTS `civicrm_contribution_widget`;
DROP TABLE IF EXISTS `civicrm_premiums_product`;
DROP TABLE IF EXISTS `civicrm_product`;
DROP TABLE IF EXISTS `civicrm_contribution_page`;
DROP TABLE IF EXISTS `civicrm_mailing_event_confirm`;
DROP TABLE IF EXISTS `civicrm_mailing_event_subscribe`;
DROP TABLE IF EXISTS `civicrm_group_organization`;
DROP TABLE IF EXISTS `civicrm_group_nesting`;
DROP TABLE IF EXISTS `civicrm_group_contact_cache`;
DROP TABLE IF EXISTS `civicrm_subscription_history`;
DROP TABLE IF EXISTS `civicrm_group`;
DROP TABLE IF EXISTS `civicrm_acl_cache`;
DROP TABLE IF EXISTS `civicrm_status_pref`;
DROP TABLE IF EXISTS `civicrm_word_replacement`;
DROP TABLE IF EXISTS `civicrm_print_label`;
DROP TABLE IF EXISTS `civicrm_setting`;
DROP TABLE IF EXISTS `civicrm_website`;
DROP TABLE IF EXISTS `civicrm_openid`;
DROP TABLE IF EXISTS `civicrm_timezone`;
DROP TABLE IF EXISTS `civicrm_uf_match`;
DROP TABLE IF EXISTS `civicrm_tag`;
DROP TABLE IF EXISTS `civicrm_state_province`;
DROP TABLE IF EXISTS `civicrm_phone`;
DROP TABLE IF EXISTS `civicrm_option_value`;
DROP TABLE IF EXISTS `civicrm_note`;
DROP TABLE IF EXISTS `civicrm_navigation`;
DROP TABLE IF EXISTS `civicrm_menu`;
DROP TABLE IF EXISTS `civicrm_mapping_field`;
DROP TABLE IF EXISTS `civicrm_mail_settings`;
DROP TABLE IF EXISTS `civicrm_log`;
DROP TABLE IF EXISTS `civicrm_job_log`;
DROP TABLE IF EXISTS `civicrm_job`;
DROP TABLE IF EXISTS `civicrm_im`;
DROP TABLE IF EXISTS `civicrm_entity_file`;
DROP TABLE IF EXISTS `civicrm_email`;
DROP TABLE IF EXISTS `civicrm_domain`;
DROP TABLE IF EXISTS `civicrm_custom_field`;
DROP TABLE IF EXISTS `civicrm_custom_group`;
DROP TABLE IF EXISTS `civicrm_country`;
DROP TABLE IF EXISTS `civicrm_cache`;
DROP TABLE IF EXISTS `civicrm_cxn`;
DROP TABLE IF EXISTS `civicrm_pcp`;
DROP TABLE IF EXISTS `civicrm_queue_item`;
DROP TABLE IF EXISTS `civicrm_pledge_block`;
DROP TABLE IF EXISTS `civicrm_tell_friend`;
DROP TABLE IF EXISTS `civicrm_grant`;
DROP TABLE IF EXISTS `civicrm_case_type`;
DROP TABLE IF EXISTS `civicrm_dedupe_exception`;
DROP TABLE IF EXISTS `civicrm_dedupe_rule`;
DROP TABLE IF EXISTS `civicrm_dedupe_rule_group`;
DROP TABLE IF EXISTS `civicrm_event_carts`;
DROP TABLE IF EXISTS `civicrm_participant_status_type`;
DROP TABLE IF EXISTS `civicrm_survey`;
DROP TABLE IF EXISTS `civicrm_campaign_group`;
DROP TABLE IF EXISTS `civicrm_campaign`;
DROP TABLE IF EXISTS `civicrm_membership_status`;
DROP TABLE IF EXISTS `civicrm_financial_item`;
DROP TABLE IF EXISTS `civicrm_entity_financial_account`;
DROP TABLE IF EXISTS `civicrm_financial_type`;
DROP TABLE IF EXISTS `civicrm_payment_processor_type`;
DROP TABLE IF EXISTS `civicrm_financial_account`;
DROP TABLE IF EXISTS `civicrm_currency`;
DROP TABLE IF EXISTS `civicrm_premiums`;
DROP TABLE IF EXISTS `civicrm_mailing_bounce_pattern`;
DROP TABLE IF EXISTS `civicrm_mailing_bounce_type`;
DROP TABLE IF EXISTS `civicrm_mailing_abtest`;
DROP TABLE IF EXISTS `civicrm_mailing_component`;
DROP TABLE IF EXISTS `civicrm_entity_batch`;
DROP TABLE IF EXISTS `civicrm_batch`;
DROP TABLE IF EXISTS `civicrm_contact_type`;
DROP TABLE IF EXISTS `civicrm_saved_search`;
DROP TABLE IF EXISTS `civicrm_relationship_type`;
DROP TABLE IF EXISTS `civicrm_acl_contact_cache`;
DROP TABLE IF EXISTS `civicrm_contact`;
DROP TABLE IF EXISTS `civicrm_acl_entity_role`;
DROP TABLE IF EXISTS `civicrm_acl`;
DROP TABLE IF EXISTS `civicrm_recurring_entity`;
DROP TABLE IF EXISTS `civicrm_action_mapping`;
DROP TABLE IF EXISTS `civicrm_prevnext_cache`;
DROP TABLE IF EXISTS `civicrm_persistent`;
DROP TABLE IF EXISTS `civicrm_component`;
DROP TABLE IF EXISTS `civicrm_worldregion`;
DROP TABLE IF EXISTS `civicrm_system_log`;
DROP TABLE IF EXISTS `civicrm_preferences_date`;
DROP TABLE IF EXISTS `civicrm_option_group`;
DROP TABLE IF EXISTS `civicrm_msg_template`;
DROP TABLE IF EXISTS `civicrm_mapping`;
DROP TABLE IF EXISTS `civicrm_managed`;
DROP TABLE IF EXISTS `civicrm_location_type`;
DROP TABLE IF EXISTS `civicrm_file`;
DROP TABLE IF EXISTS `civicrm_extension`;
DROP TABLE IF EXISTS `civicrm_address_format`;
SET FOREIGN_KEY_CHECKS=1;

View file

@ -0,0 +1,12 @@
INSERT INTO `civicrm_payment_processor` (`domain_id`, `name`, `description`, `payment_processor_type_id`, `is_active`, `is_default`, `is_test`, `user_name`, `password`, `signature`, `url_site`, `url_api`, `url_recur`, `url_button`, `subject`, `class_name`, `billing_mode`, `is_recur`, `payment_type`) VALUES (1, 'Test Processor', '', 8, 1, 1, 0, 'dummy', NULL, NULL, 'http://dummy.com', NULL, 'http://dummyrecur.com', NULL, NULL, 'Payment_Dummy', 1, 1, 1);
INSERT INTO `civicrm_payment_processor` (`domain_id`, `name`, `description`, `payment_processor_type_id`, `is_active`, `is_default`, `is_test`, `user_name`, `password`, `signature`, `url_site`, `url_api`, `url_recur`, `url_button`, `subject`, `class_name`, `billing_mode`, `is_recur`, `payment_type`) VALUES (1, 'Test Processor', '', 8, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Payment_Dummy', 1, 1, 1);
SELECT @dp := max(id) from civicrm_payment_processor where name = 'Test Processor' AND is_test = 0;
SELECT @dpTest := max(id) from civicrm_payment_processor where name = 'Test Processor' AND is_test = 1;
INSERT INTO `civicrm_entity_financial_account` (`entity_table`, `entity_id`, `account_relationship`, `financial_account_id`) VALUES ('civicrm_payment_processor', @dp, 6, 12);
INSERT INTO `civicrm_entity_financial_account` (`entity_table`, `entity_id`, `account_relationship`, `financial_account_id`) VALUES ('civicrm_payment_processor', @dpTest, 6, 12);
UPDATE `civicrm_contribution_page` SET payment_processor = @dp;
UPDATE `civicrm_event` SET payment_processor = @dp;

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,30 @@
-- This code has been copied from the auto-generated civicrm.mysql
-- It is required to facilitate queue-backed upgrades.
-- /*******************************************************
-- *
-- * civicrm_queue_item
-- *
-- * Stores a list of queue items
-- *
-- *******************************************************/
CREATE TABLE `civicrm_queue_item` (
`id` int unsigned NOT NULL AUTO_INCREMENT ,
`queue_name` varchar(64) NOT NULL COMMENT 'Name of the queue which includes this item',
`weight` int NOT NULL ,
`submit_time` datetime NOT NULL COMMENT 'date on which this item was submitted to the queue',
`release_time` datetime COMMENT 'date on which this job becomes available; null if ASAP',
`data` text COMMENT 'Serialized queue'
,
PRIMARY KEY ( `id` )
, INDEX `index_queueids`(
`queue_name`
, `weight`
, `id`
)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;

View file

@ -0,0 +1,361 @@
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at https://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from civicrm_sample.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
--
SELECT @domainID := id FROM civicrm_domain where name = 'Default Domain Name';
-- Sample Extended Property Group and Fields
INSERT INTO `civicrm_price_set` (`name`,`title`,`is_active`,`extends`,`is_quick_config`)
VALUES ('help_support_civicrm_amount', 'Help Support CiviCRM!', 1, 2, 1);
SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 and name = 'help_support_civicrm_amount';
INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
VALUES ( @priceSetId, 'contribution_amount', 'Contribution Amount', 'Radio', 0, 2, 1, 1, 1, 0, 1),
( @priceSetId, 'other_amount', 'Other Amount', 'Text', 0, 3, 0, 1, 1, 0, 1);
INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
VALUES ('civicrm_contribution_page', 1, @priceSetId);
SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'contribution_amount';
INSERT INTO
`civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
VALUES
(@priceFieldID,'friend','Friend','1.00',1,1,0,1),
(@priceFieldID,'supporter', 'Supporter','5.00',2,1,0,1),
(@priceFieldID,'booster','Booster','10.00',3,1,1,1),
(@priceFieldID,'sustainer','Sustainer','50.00',4,1,0,1);
SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'other_amount';
INSERT INTO
`civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
VALUES
(@priceFieldID, 'other_amount', 'Other Amount', 1, 3, 1, 0, 1);
INSERT INTO civicrm_contribution_page
(title,intro_text,financial_type_id,is_monetary,is_allow_other_amount,default_amount_id,min_amount,max_amount,goal_amount,thankyou_title,thankyou_text,thankyou_footer,receipt_from_name,receipt_from_email,cc_receipt,bcc_receipt,receipt_text,is_active,footer_text,amount_block_is_active,currency,is_email_receipt)
VALUES
('Help Support CiviCRM!','Do you love CiviCRM? Do you use CiviCRM? Then please support CiviCRM and Contribute NOW by trying out our new online contribution features!',1,1,1,137,'10.00','10000.00','100000.00','Thanks for Your Support!','<p>Thank you for your support. Your contribution will help us build even better tools.</p><p>Please tell your friends and colleagues about CiviCRM!</p>','<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>','CiviCRM Fundraising Dept.','donationFake@civicrm.org','receipt@example.com','bcc@example.com','Your donation is tax deductible under IRS 501(c)(3) regulation. Our tax identification number is: 93-123-4567',1, NULL, 1, 'USD', 1),
('Member Signup and Renewal', 'Members are the life-blood of our organization. If you''re not already a member - please consider signing up today. You can select the membership level the fits your budget and needs below.', 2, 1, NULL, NULL, NULL, NULL, NULL, 'Thanks for Your Support!', 'Thanks for supporting our organization with your membership. You can learn more about membership benefits from our members only page.', NULL, 'Membership Department', 'memberships@civicrm.org', NULL, NULL, 'Thanks for supporting our organization with your membership. You can learn more about membership benefits from our members only page.\r\n\r\nKeep this receipt for your records.', 1, NULL, 0, 'USD', 1),
('Pledge for CiviCRM!','Do you love CiviCRM? Do you use CiviCRM? Then please support CiviCRM and Pledge NOW by trying out our online contribution features!',1,1,1,NULL,'10.00','10000.00','100000.00','Thanks for Your Support!','<p>Thank you for your support. Your contribution will help us build even better tools like Pledge.</p><p>Please tell your friends and colleagues about CiviPledge!</p>','<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>','CiviCRM Fundraising Dept.','donationFake@civicrm.org','receipt@example.com','bcc@example.com','Your donation is tax deductible under IRS 501(c)(3) regulation. Our tax identification number is: 93-123-4567',1, NULL, 1, 'USD', 1);
INSERT INTO `civicrm_tell_friend`
(`entity_table`, `entity_id`, `title`, `intro`, `suggested_message`, `general_link`, `thankyou_title`, `thankyou_text`, `is_active`)
VALUES
('civicrm_contribution_page', 1, 'Tell A Friend', '<p>Help us spread the word and leverage the power of your contribution by telling your friends. Use the space below to personalize your email message - let your friends know why you support us. Then fill in the name(s) and email address(es) and click ''Send Your Message''.</p>', 'Thought you might be interested in learning about and helping this organization. I think they do important work.', NULL, 'Thanks for Spreading the Word', '<p><strong>Thanks for telling your friends about us and supporting our efforts. Together we can make a difference.</strong></p>', 1),
('civicrm_event', 1, 'Tell A Friend', '<p>Help us spread the word about this event. Use the space below to personalize your email message - let your friends know why you''re attending. Then fill in the name(s) and email address(es) and click ''Send Your Message''.</p>', 'Thought you might be interested in checking out this event. I''m planning on attending.', NULL, 'Thanks for Spreading the Word', '<p>Thanks for spreading the word about this event to your friends.</p>', 1);
INSERT INTO `civicrm_pcp_block`
(`id`, `entity_table`, `entity_id`, `supporter_profile_id`, `owner_notify_id`, `is_approval_needed`, `is_tellfriend_enabled`, `tellfriend_limit`, `link_text`, `is_active`, `target_entity_id` )
VALUES
(1, 'civicrm_contribution_page', 1, 2, 1, 1, 1, 5, 'Create your own Personal Campaign Page!', 1, 1);
INSERT INTO civicrm_membership_type
(domain_id, name, description, member_of_contact_id, financial_type_id, minimum_fee, duration_unit, duration_interval, period_type, fixed_period_start_day, fixed_period_rollover_day, relationship_type_id, relationship_direction, visibility, weight, is_active)
VALUES
(@domainID, 'General', 'Regular annual membership.', 1, 2, 100.00, 'year', 2, 'rolling', NULL, NULL, 7, 'b_a', 'Public', 1, 1),
(@domainID, 'Student', 'Discount membership for full-time students.', 1, 2, 50.00, 'year', 1, 'rolling', NULL, NULL, NULL, NULL, 'Public', 2, 1),
(@domainID, 'Lifetime', 'Lifetime membership.', 1, 2, 1200.00, 'lifetime', 1, 'rolling', NULL, NULL, 7, 'b_a', 'Admin', 3, 1);
INSERT INTO civicrm_membership_block
(entity_table, entity_id, membership_types, membership_type_default, display_min_fee, is_separate_payment, new_title, new_text, renewal_title, renewal_text, is_required, is_active)
VALUES
('civicrm_contribution_page', 2, 'a:2:{i:1;i:0;i:2;i:0;}', 1, 1, 0, 'Membership Levels', 'Please select the appropriate membership level below. You will have a chance to review your selection and the corresponding dues on the next page prior to your credit card being charged.', 'Renew or Upgrade Your Membership', 'Information on your current membership level and expiration date is shown below. You may renew or upgrade at any time - but don''t let your membership lapse!', 1, 1);
INSERT INTO civicrm_pledge_block ( entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day)
VALUES
('civicrm_contribution_page', 3, 'weekmonthyear', 1, 1, 5, 5),
('civicrm_contribution_page', 1, 'weekmonthyear', 0, 2, 5, 5);
INSERT INTO civicrm_premiums
VALUES (1, 'civicrm_contribution_page', 1, 1, 'Thank-you Gifts', 'We appreciate your support and invite you to choose from the exciting collection of thank-you gifts below. Minimum contribution amounts for each selection are included in the descriptions. (NOTE: These gifts are shown as examples only. No gifts will be sent to donors.)', 'premiums@example.org', NULL, 1, 'No thank-you', 1);
INSERT INTO civicrm_product VALUES (1, 'Coffee Mug', 'This heavy-duty mug is great for home or office, coffee or tea or hot chocolate. Show your support to family, friends and colleagues. Choose from three great colors.', 'MUG-101', 'White, Black, Green', NULL, NULL, 12.50, 'USD', NULL, 5.00, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO civicrm_premiums_product VALUES (1, 1, 1, 1, NULL);
-- Add sample activity type
SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
SELECT @option_value_max_val := max(ROUND(civicrm_option_value.value)) from civicrm_option_value where option_group_id = @option_group_id_act;
INSERT INTO
`civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `icon`)
VALUES
(@option_group_id_act, 'Interview', (SELECT @option_value_max_val := @option_value_max_val + 1), 'Interview', NULL, 0, NULL, @option_value_max_val, 'Conduct a phone or in person interview.', 0, 0, 1, 'fa-comment-o');
INSERT INTO `civicrm_contact_type`
( `name`, `label`,`image_URL`, `parent_id`, `is_active`,`is_reserved`)
VALUES
( 'Student' , 'Student' , NULL, 1, 1, 0),
( 'Parent' , 'Parent' , NULL, 1, 1, 0),
( 'Staff' , 'Staff' , NULL, 1, 1, 0),
( 'Team' , 'Team' , NULL, 3, 1, 0),
( 'Sponsor' , 'Sponsor' , NULL, 3, 1, 0);
SELECT @domain_id := min(id) FROM civicrm_domain;
SELECT @nav_indi := id FROM civicrm_navigation WHERE name = 'New Individual';
SELECT @nav_org := id FROM civicrm_navigation WHERE name = 'New Organization';
INSERT INTO `civicrm_navigation`
( domain_id, url, label, name,permission, permission_operator, parent_id, is_active, has_separator, weight )
VALUES
( @domain_id, 'civicrm/contact/add?ct=Individual&cst=Student&reset=1' , 'New Student', 'New Student', 'add contacts', '', @nav_indi, '1', NULL, 1 ),
( @domain_id, 'civicrm/contact/add?ct=Individual&cst=Parent&reset=1' , 'New Parent' , 'New Parent' , 'add contacts', '', @nav_indi, '1', NULL, 2 ),
( @domain_id, 'civicrm/contact/add?ct=Individual&cst=Staff&reset=1' , 'New Staff' , 'New Staff' , 'add contacts', '', @nav_indi, '1', NULL, 3 ),
( @domain_id, 'civicrm/contact/add?ct=Organization&cst=Team&reset=1' , 'New Team' , 'New Team' , 'add contacts', '', @nav_org , '1', NULL, 1 ),
( @domain_id, 'civicrm/contact/add?ct=Organization&cst=Sponsor&reset=1', 'New Sponsor', 'New Sponsor', 'add contacts', '', @nav_org , '1', NULL, 2 );
-- Add sample dashlets
INSERT INTO `civicrm_dashboard`
( `domain_id`, `name`, `label`, `url`, `permission`, `permission_operator`, `is_active`, `fullscreen_url`)
VALUES
( @domain_id, 'report/7', 'Donor Summary', 'civicrm/report/instance/7?reset=1&section=1&charts=barChart', 'access CiviContribute', 'AND', '1', 'civicrm/report/instance/7?reset=1&section=1&charts=barChart&context=dashletFullscreen'),
( @domain_id, 'report/14', 'Top Donors', 'civicrm/report/instance/14?reset=1&section=2', 'access CiviContribute', 'AND', '1', 'civicrm/report/instance/14?reset=1&section=2&context=dashletFullscreen'),
( @domain_id, 'report/27', 'Event Income Summary', 'civicrm/report/instance/27?reset=1&section=1&charts=pieChart', 'access CiviEvent' , 'AND', '1', 'civicrm/report/instance/27?reset=1&section=1&charts=pieChart&context=dashletFullscreen'),
( @domain_id, 'report/22', 'Membership Summary', 'civicrm/report/instance/22?reset=1&section=2', 'access CiviMember' , 'AND', '1', 'civicrm/report/instance/22?reset=1&section=2&context=dashletFullscreen');
-- INSERT sample data for membership
SELECT @financial_type_id := max(id) FROM `civicrm_financial_type` WHERE `name` = 'Member Dues';
SELECT @priceSetID := max(id) FROM `civicrm_price_set` WHERE `name` LIKE 'default_membership_type_amount' AND `is_quick_config` = 1;
INSERT INTO `civicrm_price_field` ( `price_set_id`, `name`, `label`, `html_type` )
VALUES ( @priceSetID, '1', 'Membership Amount', 'Radio' );
SELECT @priceFieldId := max(id) FROM `civicrm_price_field` WHERE `name` LIKE '1';
INSERT civicrm_price_field_value ( price_field_id, name, label, description, amount, weight, membership_type_id, financial_type_id )
SELECT @priceFieldId, LOWER(name), name, description, minimum_fee, id as weight, id, @financial_type_id FROM `civicrm_membership_type`;
INSERT INTO `civicrm_price_set` (`name`,`title`,`is_active`,`extends`, `financial_type_id`, `is_quick_config`)
VALUES ('member_signup_and_renewal', 'Member Signup and Renewal', 1, 3, @financial_type_id, 1),
('pledge_for_civicrm', 'Pledge for CiviCRM!',1,2,null,1);
SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 and name = 'member_signup_and_renewal';
INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`) VALUES ( @priceSetId, 'membership_amount', 'Membership', 'Radio', 0, 1, 1, 1, 1, 1, 1);
INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`) VALUES ('civicrm_contribution_page', 2, @priceSetId);
SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'membership_amount';
SELECT @membershipIdG := max(id) FROM `civicrm_membership_type` WHERE name= 'General';
SELECT @membershipIdS := max(id) FROM `civicrm_membership_type` WHERE name= 'Student';
INSERT INTO
`civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `membership_type_id`, `is_active`, `is_default`, `financial_type_id`)
VALUES
(@priceFieldID,'General','General','100.00', 1, @membershipIdG, 1, 1, @financial_type_id),
(@priceFieldID,'Student','Student','50.00', 1, @membershipIdS , 1, 0, @financial_type_id);
SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'pledge_for_civicrm';
INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
VALUES ( @priceSetId, 'other_amount', 'Contribution Amount', 'Text', 0, 3, 0, 1, 1, 1, 1);
INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
VALUES ('civicrm_contribution_page', 3, @priceSetId);
SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'other_amount';
INSERT INTO
`civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
VALUES
(@priceFieldID,'other_amount','Contribution Amount','1',1,1,0,1);
-- Insert sample data for event
INSERT INTO `civicrm_price_set` (`name`,`title`,`is_active`,`extends`, `is_quick_config`)
VALUES ('rain_forest_cup_youth_soccer_tournament', 'Rain-forest Cup Youth Soccer Tournament', 1, 1, 1),
('fall_fundraiser_dinner', 'Fall Fundraiser Dinner', 1, 1, 1),
('summer_solstice_festival_day_concert', 'Summer Solstice Festival Day Concert',1,1,1);
SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'rain_forest_cup_youth_soccer_tournament';
INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
VALUES ( @priceSetId, 'tournament_fees', 'Tournament Fees', 'Radio', 0, 1, 1, 1, 1, 1, 1);
INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
VALUES ('civicrm_event', 3, @priceSetId);
SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'tournament_fees';
INSERT INTO
`civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
VALUES
(@priceFieldID,'tiny_tots__ages_5_8_','Tiny-tots (ages 5-8)','800',1,1,1,4),
(@priceFieldID,'junior_Stars__ages_9_12_','Junior Stars (ages 9-12)','1000',2,1,0,4),
(@priceFieldID,'super_Stars__ages_13_18_','Super Stars (ages 13-18)','1500',3,1,0,4);
SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'fall_fundraiser_dinner';
INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
VALUES ( @priceSetId, 'dinner_contribution', 'Dinner Contribution', 'Radio', 0, 1, 1, 1, 1, 1, 1);
INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
VALUES ('civicrm_event', 1, @priceSetId);
SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'dinner_contribution';
INSERT INTO
`civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
VALUES
(@priceFieldID,'single','Single','50',1,1,1,4),
(@priceFieldID,'couple','Couple','100',2,1,0,4),
(@priceFieldID,'family','Family','200',3,1,0,4);
SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'summer_solstice_festival_day_concert';
INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
VALUES ( @priceSetId, 'festival_fee', 'Festival Fee', 'Radio', 0, 1, 1, 1, 1, 1, 1);
INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
VALUES ('civicrm_event', 2, @priceSetId);
SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'festival_fee';
INSERT INTO
`civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
VALUES
(@priceFieldID,'bass','Bass','25',1,1,1,2),
(@priceFieldID,'tenor','Tenor','40',2,1,0,2),
(@priceFieldID,'soprano','Soprano','50',3,1,0,2);
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
--
-- Generated from civicrm_acl.tpl
-- DO NOT EDIT. Generated by CRM_Core_CodeGen
--
-- sample acl entries
-- Create ACL to edit and view contacts in all groups
INSERT INTO civicrm_acl (name, deny, entity_table, entity_id, operation, object_table, object_id, acl_table, acl_id, is_active)
VALUES
('Edit All Contacts', 0, 'civicrm_acl_role', 1, 'Edit', 'civicrm_saved_search', 0, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access all custom data', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'view event info', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'register for events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviCRM', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviContribute', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviEvent', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMail', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMember', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviPledge', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer CiviCase', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access my cases and activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access all cases and activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviCase', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviGrant', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access Contact Dashboard', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer Multiple Organizations', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviContribute', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviMail', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviPledge', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviEvent', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviMember', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'translate CiviCRM', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit grants', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access all custom data', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access uploaded files', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'add contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer CiviCRM', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit all contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit event participants', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit groups', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit memberships', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviReport', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access Report Criteria', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer Reports', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'import contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'make online contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'make online pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile create', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile edit', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile listings', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile view', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'register for events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view all activities', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view all contacts', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view event info', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view event participants', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit all events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'access all custom data', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'make online contributions', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'make online pledges', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'register for events', NULL, NULL, NULL, 1),
('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'view event info', NULL, NULL, NULL, 1);
-- Create default Groups for User Permissioning
INSERT INTO civicrm_group (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `group_type`) VALUES (1, 'Administrators', 'Administrators', 'Contacts in this group are assigned Administrator role permissions.', NULL, NULL, 1, 'User and User Admin Only', '1');
-- Assign above Group (entity) to the Administrator Role
INSERT INTO civicrm_acl_entity_role
(`acl_role_id`, `entity_table`, `entity_id`, `is_active`)
VALUES
(1, 'civicrm_group', 1, 1);

View file

@ -0,0 +1,109 @@
-- +--------------------------------------------------------------------+
-- | CiviCRM version 4.7 |
-- +--------------------------------------------------------------------+
-- | Copyright CiviCRM LLC (c) 2004-2017 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
-- | CiviCRM is free software; you can copy, modify, and distribute it |
-- | under the terms of the GNU Affero General Public License |
-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-- | |
-- | CiviCRM is distributed in the hope that it will be useful, but |
-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-- | See the GNU Affero General Public License for more details. |
-- | |
-- | You should have received a copy of the GNU Affero General Public |
-- | License and the CiviCRM Licensing Exception along |
-- | with this program; if not, contact CiviCRM LLC |
-- | at info[AT]civicrm[DOT]org. If you have questions about the |
-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
-- /*******************************************************
-- *
-- * Sample Custom Data
-- *
-- *******************************************************/
-- /*******************************************************
-- *
-- * 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);
-- /*******************************************************
-- *
-- * 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', 1, 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';
-- /*******************************************************
-- *
-- * 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);
-- /*******************************************************
-- *
-- * 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);
-- /*******************************************************
-- *
-- * create table to store custom values of a custom group
-- *
-- *******************************************************/
DROP TABLE IF EXISTS `civicrm_value_constituent_information_1`;
CREATE TABLE `civicrm_value_constituent_information_1` (`id` int(10) unsigned NOT NULL auto_increment, `entity_id` int(10) unsigned NOT NULL, `most_important_issue_1` varchar(255) default NULL, `marital_status_2` varchar(255) default NULL, `marriage_date_3` datetime default NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_entity_id` (`entity_id`), INDEX `INDEX_most_important_issue_1` (`most_important_issue_1`), INDEX `INDEX_marital_status_2` (`marital_status_2`), INDEX `INDEX_marriage_date_3` (`marriage_date_3`), CONSTRAINT `FK_civicrm_value_constituent_information_1_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Fall Fundraiser Dinner participants custom data
INSERT INTO civicrm_option_group ( name, title, is_active, is_reserved ) VALUES ('soup_selection', 'Soup Selection', 1, 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');
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);
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=utf8 COLLATE=utf8_unicode_ci;
-- 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');
SELECT @cgid_contribution := MAX(id) FROM civicrm_custom_group;
INSERT INTO civicrm_option_group ( name, title, is_active ) VALUES ('how_long_have_you_been_a_donor', 'How long have you been a donor?', 1);
SELECT @ogid_contribution := MAX(id) FROM civicrm_option_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`) VALUES (@cgid_contribution, 'Known areas of interest', 'Known_areas_of_interest', 'Memo', 'TextArea', 1, 255, 60, 4, 'known_areas_of_interest_5', NULL),(@cgid_contribution, 'How long have you been a donor?', 'How_long_have_you_been_a_donor_', 'String', 'Radio', 1, 255, 60, 4, 'how_long_have_you_been_a_donor_6', @ogid_contribution);
INSERT INTO `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `weight`) VALUES (@ogid_contribution, 'Less than 1 year', '1', 'Less_than_1_year', 1), (@ogid_contribution, '1-3 years', '2', '1_3_years', 2),(@ogid_contribution, '4-6 years', '3', '4_6_years', 3),(@ogid_contribution, '7-9 years', '4', '7_9_years', 4),(@ogid_contribution, 'More than 9 years', '5', 'More_than_9_years', 5);
DROP TABLE IF EXISTS `civicrm_value_donor_information_3`;
CREATE TABLE IF NOT EXISTS `civicrm_value_donor_information_3` ( `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', `known_areas_of_interest_5` text COLLATE utf8_unicode_ci, `how_long_have_you_been_a_donor_6` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_entity_id` (`entity_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;