Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
civirules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
ayduns
civirules
Commits
e02fc0a6
Commit
e02fc0a6
authored
9 years ago
by
jaapjansma
Browse files
Options
Downloads
Patches
Plain Diff
errors with upgrade
parent
88f0e4e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Civirules/Upgrader.php
+6
-1
6 additions, 1 deletion
CRM/Civirules/Upgrader.php
sql/update1002.sql
+0
-7
0 additions, 7 deletions
sql/update1002.sql
with
6 additions
and
8 deletions
CRM/Civirules/Upgrader.php
+
6
−
1
View file @
e02fc0a6
...
...
@@ -54,7 +54,12 @@ class CRM_Civirules_Upgrader extends CRM_Civirules_Upgrader_Base {
}
// rename columns event_id and event_params in civirule_rule
if
(
CRM_Core_DAO
::
checkTableExists
(
"civirule_rule"
))
{
$this
->
executeSqlFile
(
'sql/upgrade1002.sql'
);
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civirule_rule DROP FOREIGN KEY fk_rule_event;"
);
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civirule_rule DROP INDEX fk_rule_event_idx;"
);
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civirule_rule CHANGE event_id trigger_id INT UNSIGNED;"
);
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civirule_rule CHANGE event_params trigger_params TEXT;"
);
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civirule_rule ADD CONSTRAINT fk_rule_trigger FOREIGN KEY (trigger_id) REFERENCES civirule_trigger(id);"
);
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civirule_rule ADD INDEX fk_rule_trigger_idx (trigger_id);"
);
}
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
sql/update1002.sql
deleted
100644 → 0
+
0
−
7
View file @
88f0e4e2
ALTER
TABLE
civirule_rule
DROP
FOREIGN
KEY
fk_rule_event
;
ALTER
TABLE
civirule_rule
DROP
INDEX
fk_rule_event_idx
;
ALTER
TABLE
civirule_rule
CHANGE
event_id
trigger_id
INT
UNSIGNED
;
ALTER
TABLE
civirule_rule
CHANGE
event_params
trigger_params
TEXT
;
ALTER
TABLE
civirule_rule
ADD
CONSTRAINT
fk_rule_trigger
FOREIGN
KEY
(
trigger_id
)
REFERENCES
civirule_trigger
(
id
);
ALTER
TABLE
civirule_rule
ADD
INDEX
fk_rule_trigger_idx
(
trigger_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