-- | GNU Affero General Public License or the licensing of CiviCRM, |
-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
-- +--------------------------------------------------------------------+
+--
+-- Generated from {$smarty.template}
+-- {$generated}
+--
-- This file provides template to civicrm_data.mysql. Inserts all base data needed for a new CiviCRM DB
SET @domainName := 'Default Domain Name';
('participant_role' , '{ts escape="sql"}Participant Role{/ts}' , 1, 1),
('event_type' , '{ts escape="sql"}Event Type{/ts}' , 1, 1),
('contact_view_options' , '{ts escape="sql"}Contact View Options{/ts}' , 1, 1),
+ ('contact_smart_group_display' , '{ts escape="sql"}Contact Smart Group View Options{/ts}' , 1, 1),
('contact_edit_options' , '{ts escape="sql"}Contact Edit Options{/ts}' , 1, 1),
('advanced_search_options' , '{ts escape="sql"}Advanced Search Options{/ts}' , 1, 1),
('user_dashboard_options' , '{ts escape="sql"}User Dashboard Options{/ts}' , 1, 1),
('sms_provider_name' , '{ts escape="sql"}Sms Provider Internal Name{/ts}' , 1, 1),
('auto_renew_options' , '{ts escape="sql"}Auto Renew Options{/ts}' , 1, 1),
('financial_account_type' , '{ts escape="sql"}Financial Account Type{/ts}' , 1, 1),
- ('financial_item_status' , '{ts escape="sql"}Financial Item Status{/ts}' , 1, 1),
- ('grant_program_status' , '{ts escape="sql"}Grant Program Status{/ts}' , 1, 1),
- ('allocation_algorithm' , '{ts escape="sql"}Grant Program Allocation Algorithm{/ts}' , 1, 1);
+ ('financial_item_status' , '{ts escape="sql"}Financial Item Status{/ts}' , 1, 1);
SELECT @option_group_id_pcm := max(id) from civicrm_option_group where name = 'preferred_communication_method';
SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
SELECT @option_group_id_pRole := max(id) from civicrm_option_group where name = 'participant_role';
SELECT @option_group_id_etype := max(id) from civicrm_option_group where name = 'event_type';
SELECT @option_group_id_cvOpt := max(id) from civicrm_option_group where name = 'contact_view_options';
+SELECT @option_group_id_csgOpt := max(id) from civicrm_option_group where name = 'contact_smart_group_display';
SELECT @option_group_id_ceOpt := max(id) from civicrm_option_group where name = 'contact_edit_options';
SELECT @option_group_id_asOpt := max(id) from civicrm_option_group where name = 'advanced_search_options';
SELECT @option_group_id_udOpt := max(id) from civicrm_option_group where name = 'user_dashboard_options';
SELECT @option_group_id_aro := max(id) from civicrm_option_group where name = 'auto_renew_options';
SELECT @option_group_id_fat := max(id) from civicrm_option_group where name = 'financial_account_type';
SELECT @option_group_id_financial_item_status := max(id) from civicrm_option_group where name = 'financial_item_status';
-SELECT @option_group_id_grantProgramSt := max(id) from civicrm_option_group where name = 'grant_program_status';
-SELECT @option_group_id_allocationAlgo := max(id) from civicrm_option_group where name = 'allocation_algorithm';
SELECT @contributeCompId := max(id) FROM civicrm_component where name = 'CiviContribute';
(@option_group_id_act, '{ts escape="sql"}Meeting{/ts}', 1, 'Meeting', NULL, 0, NULL, 1, NULL, 0, 1, 1, NULL, NULL),
(@option_group_id_act, '{ts escape="sql"}Phone Call{/ts}', 2, 'Phone Call', NULL, 0, NULL, 2, NULL, 0, 1, 1, NULL, NULL),
(@option_group_id_act, '{ts escape="sql"}Email{/ts}', 3, 'Email', NULL, 1, NULL, 3, '{ts escape="sql"}Email sent.{/ts}', 0, 1, 1, NULL, NULL),
- (@option_group_id_act, '{ts escape="sql"}Text Message (SMS){/ts}', 4, 'SMS', NULL, 1, NULL, 4, '{ts escape="sql"}Text message (SMS) sent.{/ts}', 0, 1, 1, NULL, NULL),
+ (@option_group_id_act, '{ts escape="sql"}Outbound SMS{/ts}', 4, 'SMS', NULL, 1, NULL, 4, '{ts escape="sql"}Text message (SMS) sent.{/ts}', 0, 1, 1, NULL, NULL),
(@option_group_id_act, '{ts escape="sql"}Event Registration{/ts}', 5, 'Event Registration', NULL, 1, NULL, 5, '{ts escape="sql"}Online or offline event registration.{/ts}', 0, 1, 1, @eventCompId, NULL),
(@option_group_id_act, '{ts escape="sql"}Contribution{/ts}', 6, 'Contribution', NULL, 1, NULL, 6, '{ts escape="sql"}Online or offline contribution.{/ts}', 0, 1, 1, @contributeCompId, NULL),
(@option_group_id_act, '{ts escape="sql"}Membership Signup{/ts}', 7, 'Membership Signup', NULL, 1, NULL, 7, '{ts escape="sql"}Online or offline membership signup.{/ts}', 0, 1, 1, @memberCompId, NULL),
(@option_group_id_act, '{ts escape="sql"}Create Batch{/ts}', 42, 'Create Batch', NULL, 1, 0, 42, 'Create Batch', 0, 1, 1, @contributeCompId, NULL),
(@option_group_id_act, '{ts escape="sql"}Edit Batch{/ts}', 43, 'Edit Batch', NULL, 1, 0, 43, 'Edit Batch', 0, 1, 1, @contributeCompId, NULL),
+-- new sms options
+ (@option_group_id_act, '{ts escape="sql"}SMS delivery{/ts}', 44, 'SMS delivery', NULL, 1, NULL, 44, '{ts escape="sql"}SMS delivery.{/ts}', 0, 1, 1, NULL, NULL),
+ (@option_group_id_act, '{ts escape="sql"}Inbound SMS{/ts}', 45, 'Inbound SMS', NULL, 1, NULL, 45, '{ts escape="sql"}Inbound SMS.{/ts}', 0, 1, 1, NULL, NULL),
+
(@option_group_id_gender, '{ts escape="sql"}Female{/ts}', 1, 'Female', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_gender, '{ts escape="sql"}Male{/ts}', 2, 'Male', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_gender, '{ts escape="sql"}Transgender{/ts}', 3, 'Transgender', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_cvOpt, '{ts escape="sql"}Cases{/ts}' , 10, 'CiviCase', NULL, 0, NULL, 10, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_cvOpt, '{ts escape="sql"}Grants{/ts}' , 11, 'CiviGrant', NULL, 0, NULL, 11, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_cvOpt, '{ts escape="sql"}Pledges{/ts}' , 13, 'CiviPledge', NULL, 0, NULL, 13, NULL, 0, 0, 1, NULL, NULL),
+ (@option_group_id_cvOpt, '{ts escape="sql"}Mailings{/ts}' , 14, 'CiviMail', NULL, 0, NULL, 14, NULL, 0, 0, 1, NULL, NULL),
+
+
+ (@option_group_id_csgOpt, '{ts escape="sql"}Show Smart Groups on Demand{/ts}',1, 'showondemand', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
+ (@option_group_id_csgOpt, '{ts escape="sql"}Always Show Smart Groups{/ts}', 2, 'alwaysshow', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
+ (@option_group_id_csgOpt, '{ts escape="sql"}Hide Smart Groups{/ts}' , 3, 'hide', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_ceOpt, '{ts escape="sql"}Custom Data{/ts}' , 1, 'CustomData', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_ceOpt, '{ts escape="sql"}Address{/ts}' , 2, 'Address', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_report, {localize}'{ts escape="sql"}Survey Report (Detail){/ts}'{/localize}, 'survey/detail', 'CRM_Report_Form_Campaign_SurveyDetails', NULL, 0, NULL, 43, {localize}'{ts escape="sql"}Detailed report for canvassing, phone-banking, walk lists or other surveys.{/ts}'{/localize}, 0, 0, 1, @campaignCompId, NULL),
(@option_group_id_report, {localize}'{ts escape="sql"}Personal Campaign Page Report{/ts}'{/localize}, 'contribute/pcp', 'CRM_Report_Form_Contribute_PCP', NULL, 0, NULL, 44, {localize}'{ts escape="sql"}Summarizes amount raised and number of contributors for each Personal Campaign Page.{/ts}'{/localize}, 0, 0, 1, @contributeCompId, NULL),
(@option_group_id_report , {localize}'{ts escape="sql"}Pledge Summary Report{/ts}'{/localize}, 'pledge/summary', 'CRM_Report_Form_Pledge_Summary', NULL, 0, NULL, 45, {localize}'{ts escape="sql"}Summary of pledges including amount pledged, pledge status, next payment date, balance due, total amount paid etc.{/ts}'{/localize}, 0, 0, 1, @pledgeCompId, NULL),
- (@option_group_id_report , '{ts escape="sql"}Contribution History By Relationship Report{/ts}', 'contribute/history', 'CRM_Report_Form_Contribute_History', NULL, 0, NULL, 46, '{ts escape="sql"}List contact's donation history, grouped by year, along with contributions attributed to any of the contact's related contacts.{/ts}', 0, 0, 1, @contributeCompId, NULL),
+ (@option_group_id_report , '{ts escape="sql"}Contribution Aggregate by Relationship{/ts}', 'contribute/history', 'CRM_Report_Form_Contribute_History', NULL, 0, NULL, 46, '{ts escape="sql"}List contact's donation history, grouped by year, along with contributions attributed to any of the contact's related contacts.{/ts}', 0, 0, 1, @contributeCompId, NULL),
(@option_group_id_report, {localize}'{ts escape="sql"}Mail Detail Report{/ts}'{/localize}, 'mailing/detail', 'CRM_Report_Form_Mailing_Detail', NULL, 0, NULL, 47, {localize}'{ts escape="sql"}Provides reporting on Intended and Successful Deliveries, Unsubscribes and Opt-outs, Replies and Forwards.{/ts}'{/localize}, 0, 0, 1, @mailCompId, NULL),
(@option_group_id_report, {localize}'{ts escape="sql"}Contribution and Membership Details{/ts}'{/localize}, 'member/contributionDetail', 'CRM_Report_Form_Member_ContributionDetail', NULL, 0, NULL, 48, {localize}'{ts escape="sql"}Contribution details for any type of contribution, plus associated membership information for contributions which are in payment for memberships.{/ts}'{/localize}, 0, 0, 1, @memberCompId, NULL),
INSERT INTO
`civicrm_financial_account` (`name`, `contact_id`, `financial_account_type_id`, `description`, `accounting_code`, `account_type_code`, `is_reserved`, `is_active`, `is_deductible`, `is_default`)
VALUES
- ( '{ts escape="sql"}Donation{/ts}' , @contactID, @opval, 'Default account for donations', '4200', 'INC', 0, 1, 1, 0 ),
+ ( '{ts escape="sql"}Donation{/ts}' , @contactID, @opval, 'Default account for donations', '4200', 'INC', 0, 1, 1, 1 ),
( '{ts escape="sql"}Member Dues{/ts}' , @contactID, @opval, 'Default account for membership sales', '4400', 'INC', 0, 1, 1, 0 ),
( '{ts escape="sql"}Campaign Contribution{/ts}', @contactID, @opval, 'Sample account for recording payments to a campaign', '4100', 'INC', 0, 1, 0, 0 ),
( '{ts escape="sql"}Event Fee{/ts}' , @contactID, @opval, 'Default account for event ticket sales', '4300', 'INC', 0, 1, 0, 0 ),
- ( '{ts escape="sql"}Banking Fees{/ts}' , @contactID, @opexp, 'Payment processor fees and manually recorded banking fees', '5200', 'EXP', 0, 1, 0, 0 ),
+ ( '{ts escape="sql"}Banking Fees{/ts}' , @contactID, @opexp, 'Payment processor fees and manually recorded banking fees', '5200', 'EXP', 0, 1, 0, 1 ),
( '{ts escape="sql"}Deposit Bank Account{/ts}' , @contactID, @opAsset, 'All manually recorded cash and cheques go to this account', '1100', 'BANK', 0, 1, 0, 1 ),
( '{ts escape="sql"}Accounts Receivable{/ts}' , @contactID, @opAsset, 'Amounts to be received later (eg pay later event revenues)', '1200', 'AR', 0, 1, 0, 0 ),
- ( '{ts escape="sql"}Accounts Payable{/ts}' , @contactID, @opLiability, 'Amounts to be paid out such as grants and refunds', '2200', 'AP', 0, 1, 0, 0 ),
- ( '{ts escape="sql"}Premiums{/ts}' , @contactID, @opCost, 'Account to record cost of premiums provided to payors', '5100', 'COGS', 0, 1, 0, 0 ),
+ ( '{ts escape="sql"}Accounts Payable{/ts}' , @contactID, @opLiability, 'Amounts to be paid out such as grants and refunds', '2200', 'AP', 0, 1, 0, 1 ),
+ ( '{ts escape="sql"}Premiums{/ts}' , @contactID, @opCost, 'Account to record cost of premiums provided to payors', '5100', 'COGS', 0, 1, 0, 1 ),
( '{ts escape="sql"}Premiums inventory{/ts}' , @contactID, @opAsset, 'Account representing value of premiums inventory', '1375', 'OCASSET', 0, 1, 0, 0 ),
( '{ts escape="sql"}Discounts{/ts}' , @contactID, @opval, 'Contra-revenue account for amounts discounted from sales', '4900', 'INC', 0, 1, 0, 0 ),
( '{ts escape="sql"}Payment Processor Account{/ts}', @contactID, @opAsset, 'Account to record payments into a payment processor merchant account', '1150', 'BANK', 0, 1, 0, 0
(@option_group_id_grantTyp, '{ts escape="sql"}General Protection{/ts}' , 3, 'General Protection', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, @domainID, NULL),
(@option_group_id_grantTyp, '{ts escape="sql"}Impunity{/ts}' , 4, 'Impunity' , NULL, 0, NULL, 4, NULL, 0, 0, 1, NULL, @domainID, NULL),
--- grant program status
- (@option_group_id_grantProgramSt, '{ts escape="sql"}Accepting Applications{/ts}' , 1, 'Accepting Applications' , NULL, 0, 1, 1, NULL, 0, 0, 1, NULL, @domainID, NULL),
- (@option_group_id_grantProgramSt, '{ts escape="sql"}Trial Allocation{/ts}' , 2, 'Trial Allocation' , NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, @domainID, NULL),
- (@option_group_id_grantProgramSt, '{ts escape="sql"}Allocation Finalized{/ts}' , 3, 'Allocation Finalized', NULL, 0, NULL, 3, NULL, 0, 0, 1, NULL, @domainID, NULL),
-
--- grant program alocation algorithm
- (@option_group_id_allocationAlgo, '{ts escape="sql"}Over Threshold, Percentage of Request Funded{/ts}' , 1, 'Over Threshold, Percentage of Request Funded' , NULL, 0, 1, 1, NULL, 0, 0, 1, NULL, @domainID, NULL),
- (@option_group_id_allocationAlgo, '{ts escape="sql"}Best to Worst, Fully Funded{/ts}' , 2, 'Best to Worst, Fully Funded' , NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, @domainID, NULL),
-
-- Mail Approval Status Preferences
(@option_group_id_mail_approval_status, '{ts escape="sql"}Approved{/ts}' , 1, 'Approved', NULL, 0, 1, 1, NULL, 0, 1, 1, @mailCompId, @domainID, NULL),
(@option_group_id_mail_approval_status, '{ts escape="sql"}Rejected{/ts}' , 2, 'Rejected', NULL, 0, 0, 2, NULL, 0, 1, 1, @mailCompId, @domainID, NULL),
(@bounceTypeID, 'sender was rejected'),
(@bounceTypeID, 'spam(check| reduction software| filters?)'),
(@bounceTypeID, 'blocked by a user configured filter'),
- (@bounceTypeID, 'detected as spam');
+ (@bounceTypeID, 'detected as spam'),
+ (@bounceTypeID, 'X-HmXmrOriginalRecipient');
INSERT INTO civicrm_mailing_bounce_type
(name, description, hold_threshold)
( 10, 'check_number', 0, 0, 7, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Check Number{/ts}', 'Contribution', NULL, NULL ),
( 10, 'send_receipt', 0, 0, 8, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Send Receipt{/ts}', 'Contribution', NULL, NULL ),
( 10, 'invoice_id', 0, 0, 9, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Invoice ID{/ts}', 'Contribution', NULL, NULL ),
+ ( 10, 'soft_credit', 0, 0, 10, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit{/ts}', 'Contribution', NULL, NULL ),
( 11, 'membership_type', 1, 1, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Type{/ts}', 'Membership', NULL, NULL ),
( 11, 'join_date', 1, 1, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Member Since{/ts}', 'Membership', NULL, NULL ),
( 11, 'membership_start_date', 0, 1, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Start Date{/ts}', 'Membership', NULL, NULL ),
( 11, 'payment_instrument', 0, 0, 10, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Paid By{/ts}', 'Membership', NULL, NULL ),
( 11, 'check_number', 0, 0, 11, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Check Number{/ts}', 'Membership', NULL, NULL ),
( 11, 'contribution_status_id', 1, 1, 12, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Payment Status{/ts}', 'Membership', NULL, NULL ),
+ ( 11, 'soft_credit', 0, 0, 13, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit{/ts}', 'Membership', NULL, NULL ),
( 12, 'email', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Email Address{/ts}', 'Contact', NULL, NULL);
SELECT @option_value_rel_id_exp := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Expense Account is';
SELECT @option_value_rel_id_ar := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Accounts Receivable Account is';
SELECT @option_value_rel_id_as := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Asset Account is';
+SELECT @option_value_rel_id_cg := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Cost of Sales Account is';
SELECT @financial_type_id_dtn := max(id) FROM civicrm_financial_type WHERE name = '{ts escape="sql"}Donation{/ts}';
SELECT @financial_type_id_md := max(id) FROM civicrm_financial_type WHERE name = '{ts escape="sql"}Member Dues{/ts}';
SELECT @financial_account_id_ap := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Accounts Receivable{/ts}';
SELECT @financial_account_id_ar := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Deposit Bank Account{/ts}';
SELECT @financial_account_id_pp := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Payment Processor Account{/ts}';
+SELECT @financial_account_id_pr := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Premiums{/ts}';
INSERT INTO `civicrm_entity_financial_account`
( entity_table, entity_id, account_relationship, financial_account_id )
( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id, @financial_account_id_dtn ),
( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id_exp, @financial_account_id_bf ),
( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id_ar, @financial_account_id_ap ),
+ ( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id_cg, @financial_account_id_pr ),
( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id, @financial_account_id_md ),
( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id_exp, @financial_account_id_bf ),
( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id_ar, @financial_account_id_ap ),
+ ( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id_cg, @financial_account_id_pr ),
( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id, @financial_account_id_cc ),
( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id_exp, @financial_account_id_bf ),
( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id_ar, @financial_account_id_ap ),
+ ( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id_cg, @financial_account_id_pr ),
( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id_exp, @financial_account_id_bf ),
( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id_ar, @financial_account_id_ap ),
- ( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id, @financial_account_id_ef );
+ ( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id, @financial_account_id_ef ),
+ ( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id_cg, @financial_account_id_pr );
-- CRM-11516
INSERT INTO civicrm_entity_financial_account (entity_table, entity_id, account_relationship, financial_account_id)