Skip to content
Snippets Groups Projects
Commit f903a2cd authored by Erik Hommel's avatar Erik Hommel
Browse files

issue #42 upgrader for event to trigger

parent f00ca018
Branches
Tags
No related merge requests found
......@@ -71,7 +71,6 @@ class CRM_Civirules_Form_RuleAction extends CRM_Core_Form {
* @access public
*/
function postProcess() {
$saveParams = array(
'rule_id' => $this->_submitValues['rule_id'],
'action_id' => $this->_submitValues['rule_action_select'],
......
......@@ -54,11 +54,7 @@ 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")) {
CRM_Core_DAO::executeQuery("ALTER TABLE civirule_rule CHANGE event_id trigger_id INT");
CRM_Core_DAO::executeQuery("ALTER TABLE civirule_rule CHANGE event_params trigger_params TEXT");
$this->executeSqlFile('sql/upgrade1002.sql');
}
// remove index on event_id and add one on trigger_id
CRM_Core_DAO("ALTER TABLE civirule_rule ADD INDEX fk_rule_trigger_idx (trigger_id),
DROP INDEX fk_rule_event_idx");
}
}
\ No newline at end of file
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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment