Commit c213dee5 authored by eileen's avatar eileen

CRM-12595 fix formatting in sql files

parent e4c95fd7
......@@ -4,8 +4,8 @@ The list below are enums from the database (except the last 2).
private $preferred_communication_method = array('Phone', 'Email', 'Post');
private $greeting_type = array('Formal', 'Informal', 'Honorific', 'Custom', 'Other');
private $contact_type = array('Individual', 'Household', 'Organization');
private $gender = array('Female', 'Male', 'Transgender');
private $phone_type = array('Phone', 'Mobile', 'Fax', 'Pager');
private $gender = array('Female', 'Male', 'Transgender');
private $phone_type = array('Phone', 'Mobile', 'Fax', 'Pager');
// almost enums
private $prefix = array('Mr', 'Mrs', 'Ms', 'Dr');
......@@ -312,7 +312,7 @@ Array
Mapping of Household with Individuals.
Currently it's a simple mapping of
Currently it's a simple mapping of
each household has 4 members.
1st and 2nd members are spouses
......
......@@ -1233,11 +1233,11 @@ class CRM_GCD {
$membershipTypeNames = array('Student', 'General');
$statuses = array(3, 4);
$membership = "
INSERT INTO civicrm_membership
$membership = "
INSERT INTO civicrm_membership
(contact_id, membership_type_id, join_date, start_date, end_date, source, status_id)
VALUES
";
VALUES
";
$activity = "
INSERT INTO civicrm_activity
(source_contact_id, source_record_id, activity_type_id, subject, activity_date_time, duration, location, phone_id, phone_number, details, priority_id,parent_id, is_test, status_id)
......@@ -1530,8 +1530,8 @@ VALUES
function addPledge() {
$pledge = "INSERT INTO civicrm_pledge
(contact_id, financial_type_id, contribution_page_id, amount, frequency_unit, frequency_interval, frequency_day, installments, start_date, create_date, acknowledge_date, modified_date, cancel_date, end_date, honor_contact_id, honor_type_id, status_id, is_test)
VALUES
(contact_id, financial_type_id, contribution_page_id, amount, frequency_unit, frequency_interval, frequency_day, installments, start_date, create_date, acknowledge_date, modified_date, cancel_date, end_date, honor_contact_id, honor_type_id, status_id, is_test)
VALUES
(71, 1, 1, 500.00, 'month', 1, 1, 1, '2010-07-01 21:19:02', '2010-06-26 00:00:00', NULL, NULL, NULL,'2010-07-01 00:00:00', NULL, NULL, 1, 0),
(43, 1, 1, 800.00, 'month', 3, 1, 4, '2010-07-01 10:11:09', '2010-06-23 10:11:14', '2010-06-23 10:11:18', NULL, NULL, '2010-04-01 10:11:40', NULL, NULL, 5, 0),
(32, 1, 1, 600.00, 'month', 1, 1, 3, '2010-06-01 10:12:35', '2010-05-14 10:12:44', '2010-05-14 10:12:52', NULL, NULL, '2010-08-01 10:13:11', NULL, NULL, 5, 0);
......@@ -1540,9 +1540,9 @@ VALUES
}
function addPledgePayment() {
$pledgePayment = "INSERT INTO civicrm_pledge_payment
( pledge_id, contribution_id, scheduled_amount, scheduled_date, reminder_date, reminder_count, status_id)
VALUES
$pledgePayment = "INSERT INTO civicrm_pledge_payment
( pledge_id, contribution_id, scheduled_amount, scheduled_date, reminder_date, reminder_count, status_id)
VALUES
(1, 10, 500.00, '2010-07-01 13:03:45', null, 0, 1),
(2, 11, 200.00, '2010-07-01 10:59:35', null, 0, 1),
(2, null, 200.00, '2010-10-01 10:59:35',null, 0, 2),
......@@ -1572,7 +1572,7 @@ VALUES
for ($i = 0; $i < 3; $i++) {
$contributionsArray = $membershipArray = array();
$contributionSQL = "
SELECT id
SELECT id
FROM civicrm_contribution
WHERE contribution_page_id IS NULL AND
total_amount = {$amount[$i]} limit 0, 50 ";
......@@ -1584,8 +1584,8 @@ VALUES
}
$j = $i + 1;
$membershipSQL = "
SELECT id
FROM civicrm_membership
SELECT id
FROM civicrm_membership
WHERE civicrm_membership.membership_type_id = {$j} limit 0, 50";
$membershipDAO = CRM_Core_DAO::executeQuery($membershipSQL, CRM_Core_DAO::$_nullArray);
......
......@@ -16,11 +16,11 @@ SELECT @option_group_id_case_type := max(id) from civicrm_option_group wh
SELECT @max_val := IF ( value <> 'NULL',max(value) , 0 ) from civicrm_option_value where option_group_id=@option_group_id_case_type;
SELECT @max_wt := IF ( value <> 'NULL',max(weight), 0 ) from civicrm_option_value where option_group_id=@option_group_id_case_type;
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
(SELECT @option_group_id_case_type, 'Housing Support', @max_val + 1, 'housing_support', NULL, 0, 0, @max_wt + 1, 'Help homeless individuals obtain temporary and long-term housing', 0, 0, 1
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'housing_support'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
INSERT INTO `civicrm_option_value` ( `option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
(SELECT @option_group_id_case_type, 'Adult Day Care Referral', @max_val + 2, 'adult_day_care_referral', NULL, 0, 0, @max_wt + 2, 'Arranging adult day care for senior individuals', 0, 0, 1
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'adult_day_care_referral'));
......@@ -43,26 +43,26 @@ SELECT @option_group_id_activity_type := max(id) from civicrm_option_grou
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
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
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` )
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` )
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` )
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` )
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'));
\ No newline at end of file
......@@ -6,15 +6,15 @@
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 '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 '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'));
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'));
-- /*******************************************************
-- *
......
......@@ -21,15 +21,15 @@
-- | 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
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);
......@@ -39,8 +39,8 @@ SELECT @option_group_id_case_viol := max(id) from civicrm_option_group wh
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`)
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),
......@@ -63,7 +63,7 @@ VALUES
(@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 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),
......
This diff is collapsed.
......@@ -16,15 +16,15 @@ CREATE TABLE `civicrm_queue_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'
`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 ;
......@@ -25,7 +25,7 @@
-- /*******************************************************
-- *
-- * Sample Custom Data
-- * Sample Custom Data
-- *
-- *******************************************************/
......
......@@ -43,11 +43,11 @@ CREATE TABLE civicrm_accept_credit_card (
is_active tinyint COMMENT 'Is this property active?'
,
PRIMARY KEY ( id )
, INDEX FKEY_domain_id ( domain_id ) ,
, INDEX FKEY_domain_id ( domain_id ) ,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
) TYPE=InnoDB ;
......@@ -238,7 +238,7 @@ CREATE TABLE civicrm_dupe_match (
-- *
-- *
-- *******************************************************/
CREATE TABLE civicrm_financial_trxn (
......@@ -306,7 +306,7 @@ CREATE TABLE civicrm_dupe_match (
FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
) TYPE=InnoDB ;
-- /*******************************************************
-- *
......@@ -364,7 +364,7 @@ CREATE TABLE civicrm_dupe_match (
-- * Modify the civicrm_uf_group Table Structure
-- *
-- *******************************************************/
ALTER TABLE `civicrm_uf_group` DROP `weight` ;
......@@ -378,7 +378,7 @@ CREATE TABLE civicrm_dupe_match (
DROP `is_match` ;
ALTER TABLE `civicrm_uf_field` ADD `location_type_id` INT UNSIGNED COMMENT 'Location type of this mapping, if required';
ALTER TABLE `civicrm_uf_field` ADD INDEX (`location_type_id`);
ALTER TABLE `civicrm_uf_field` ADD INDEX (`location_type_id`);
ALTER TABLE `civicrm_uf_field` ADD FOREIGN KEY (`location_type_id`) REFERENCES `civicrm_location_type` (`id`);
ALTER TABLE `civicrm_uf_field` ADD `phone_type` VARCHAR( 64 ) COMMENT 'Phone type, if required';
......@@ -412,9 +412,9 @@ CREATE TABLE civicrm_dupe_match (
-- *******************************************************/
INSERT INTO `civicrm_accept_credit_card` VALUES (1,1,'Visa','Visa',0,1),
(2,1,'MasterCard','Master Card',0,1),
(3,1,'Amex','American Express',0,1),
(4,1,'Discover','Discover',0,1);
(2,1,'MasterCard','Master Card',0,1),
(3,1,'Amex','American Express',0,1),
(4,1,'Discover','Discover',0,1);
-- /*******************************************************
......
......@@ -245,7 +245,7 @@ CREATE TABLE civicrm_contribution (
-- *
-- *
-- *******************************************************/
CREATE TABLE civicrm_financial_trxn (
......@@ -312,7 +312,7 @@ CREATE TABLE civicrm_contribution (
FOREIGN KEY (uf_group_id) REFERENCES civicrm_uf_group(id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-- /*******************************************************
-- *
......@@ -373,7 +373,7 @@ CREATE TABLE civicrm_contribution (
-- * Modify the civicrm_uf_group Table Structure
-- *
-- *******************************************************/
ALTER TABLE `civicrm_uf_group` DROP `weight` ;
......@@ -422,9 +422,9 @@ CREATE TABLE civicrm_contribution (
-- *******************************************************/
INSERT INTO `civicrm_accept_credit_card` VALUES (1,1,'Visa','Visa',0,1),
(2,1,'MasterCard','Master Card',0,1),
(3,1,'Amex','American Express',0,1),
(4,1,'Discover','Discover',0,1);
(2,1,'MasterCard','Master Card',0,1),
(3,1,'Amex','American Express',0,1),
(4,1,'Discover','Discover',0,1);
-- /*******************************************************
......
......@@ -268,7 +268,7 @@ CREATE TABLE civicrm_sms_history (
ALTER TABLE `civicrm_location` ADD name varchar(255);
-- /*******************************************************
-- *
-- * Modify the civicrm_uf_field Table Structure
......@@ -290,9 +290,9 @@ CREATE TABLE civicrm_sms_history (
ALTER TABLE `civicrm_uf_group` ADD limit_listings_group_id int unsigned COMMENT 'Group id, foriegn key from civicrm_group';
ALTER TABLE `civicrm_uf_group` ADD INDEX (`limit_listings_group_id`);
ALTER TABLE `civicrm_uf_group` ADD INDEX (`limit_listings_group_id`);
ALTER TABLE `civicrm_uf_group` ADD FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
ALTER TABLE `civicrm_uf_group` ADD FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
ALTER TABLE `civicrm_uf_group` ADD post_URL varchar(255) COMMENT 'Redirect to URL.';
......@@ -340,5 +340,5 @@ CREATE TABLE civicrm_sms_history (
-- * update the custom fields set options per line if it is null
-- *
-- *******************************************************/
UPDATE civicrm_custom_field SET options_per_line=0 WHERE options_per_line IS NULL;
......@@ -260,7 +260,7 @@ CREATE TABLE civicrm_sms_history (
ALTER TABLE `civicrm_location` ADD name varchar(255);
-- /*******************************************************
-- *
-- * Modify the civicrm_uf_field Table Structure
......@@ -282,7 +282,7 @@ CREATE TABLE civicrm_sms_history (
ALTER TABLE `civicrm_uf_group` ADD limit_listings_group_id int unsigned COMMENT 'Group id, foriegn key from civicrm_group';
ALTER TABLE `civicrm_uf_group` ADD CONSTRAINT FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
ALTER TABLE `civicrm_uf_group` ADD CONSTRAINT FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
ALTER TABLE `civicrm_uf_group` ADD post_URL varchar(255) COMMENT 'Redirect to URL.';
......@@ -331,5 +331,5 @@ CREATE TABLE civicrm_sms_history (
-- * update the custom fields set options per line if it is null
-- *
-- *******************************************************/
UPDATE civicrm_custom_field SET options_per_line=0 WHERE options_per_line IS NULL;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -31,12 +31,12 @@ BEGIN
-- we delete the corresponding entity_id/entity_table entries
-- from all the linked tables (note, log etc)
DELETE FROM civicrm_note
WHERE entity_id = OLD.id
WHERE entity_id = OLD.id
AND entity_table = 'civicrm_contact';
DELETE FROM civicrm_log
WHERE entity_id = OLD.id
AND entity_table = 'civicrm_contact';
DELETE FROM civicrm_task_status
DELETE FROM civicrm_task_status
WHERE responsible_entity_id = OLD.id
AND responsible_entity_table = 'civicrm_contact';
......
......@@ -23,15 +23,15 @@
-- +--------------------------------------------------------------------+
-- Inserts values for Preferred Communication Method which are missing in some upgraded 1.5 sites
INSERT INTO
`civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
VALUES
INSERT INTO
`civicrm_option_group` (`domain_id`, `name`, `description`, `is_reserved`, `is_active`)
VALUES
(1, 'preferred_communication_method', 'Preferred Communication Method' , 0, 1);
SELECT @option_group_id_pcm := max(id) from civicrm_option_group where name = 'preferred_communication_method';
INSERT INTO
`civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
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_pcm, 'Phone', 1, NULL, NULL, 0, NULL, 1, NULL, 0, 0, 1),
(@option_group_id_pcm, 'Email', 2, NULL, NULL, 0, NULL, 2, NULL, 0, 0, 1),
......
......@@ -2,7 +2,7 @@
--
-- Host: localhost Database: civicspace
-- ------------------------------------------------------
-- Server version 4.0.18-log
-- Server version 4.0.18-log
--
-- Table structure for table `zipcodes`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment