Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
3a88e331
Commit
3a88e331
authored
11 years ago
by
lobo
Browse files
Options
Downloads
Patches
Plain Diff
CRM-13665 - Make upgrade fault tolerant for merging activity contacts
http://issues.civicrm.org/jira/browse/CRM-13665
parent
52df1987
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Upgrade/Incremental/php/FourFour.php
+6
-1
6 additions, 1 deletion
CRM/Upgrade/Incremental/php/FourFour.php
with
6 additions
and
1 deletion
CRM/Upgrade/Incremental/php/FourFour.php
+
6
−
1
View file @
3a88e331
...
@@ -133,7 +133,7 @@ class CRM_Upgrade_Incremental_php_FourFour {
...
@@ -133,7 +133,7 @@ class CRM_Upgrade_Incremental_php_FourFour {
2
=>
array
(
'Fattorini Name Badge 100x65'
,
'String'
),
2
=>
array
(
'Fattorini Name Badge 100x65'
,
'String'
),
3
=>
array
(
'Hanging Badge 3-3/4" x 4-3"/4'
,
'String'
),
3
=>
array
(
'Hanging Badge 3-3/4" x 4-3"/4'
,
'String'
),
);
);
foreach
(
$insertStatements
as
$values
)
{
foreach
(
$insertStatements
as
$values
)
{
$query
=
'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`, `visibility_id`) VALUES'
.
$values
;
$query
=
'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`, `visibility_id`) VALUES'
.
$values
;
CRM_Core_DAO
::
executeQuery
(
$query
,
$queryParams
);
CRM_Core_DAO
::
executeQuery
(
$query
,
$queryParams
);
...
@@ -193,6 +193,10 @@ VALUES
...
@@ -193,6 +193,10 @@ VALUES
$dao
=
CRM_Core_DAO
::
executeQuery
(
$query
);
$dao
=
CRM_Core_DAO
::
executeQuery
(
$query
);
}
}
// sometimes an user does not make a clean backup and the above table
// already exists, so lets delete this table - CRM-13665
$query
=
"DROP TABLE civicrm_activity_contact"
;
$dao
=
CRM_Core_DAO
::
executeQuery
(
$query
);
$query
=
"
$query
=
"
CREATE TABLE IF NOT EXISTS civicrm_activity_contact (
CREATE TABLE IF NOT EXISTS civicrm_activity_contact (
...
@@ -208,6 +212,7 @@ CREATE TABLE IF NOT EXISTS civicrm_activity_contact (
...
@@ -208,6 +212,7 @@ CREATE TABLE IF NOT EXISTS civicrm_activity_contact (
$dao
=
CRM_Core_DAO
::
executeQuery
(
$query
);
$dao
=
CRM_Core_DAO
::
executeQuery
(
$query
);
$query
=
"
$query
=
"
INSERT INTO civicrm_activity_contact (activity_id, contact_id, record_type_id)
INSERT INTO civicrm_activity_contact (activity_id, contact_id, record_type_id)
SELECT activity_id, target_contact_id,
{
$targetID
}
as record_type_id
SELECT activity_id, target_contact_id,
{
$targetID
}
as record_type_id
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment