upgrade_1002 fails - refers to SQL files that no longer exist in the extension, sql/createCiviruleTrigger.sql and sql/insertCiviruleTrigger.sql
upgrade_1002 fails - refers to SQL files that no longer exist in the extension, sql/createCiviruleTrigger.sql and sql/insertCiviruleTrigger.sql
public function upgrade_1002() {
// rename table civirule_event to civirule_trigger
if (CRM_Core_DAO::checkTableExists("civirule_event")) {
CRM_Core_DAO::executeQuery("RENAME TABLE civirule_event TO civirule_trigger");
} else {
$this->executeSqlFile('sql/createCiviruleTrigger.sql');
$this->executeSqlFile('sql/insertCiviruleTrigger.sql');
}
sql/createCiviruleTrigger.sql was deleted in CiviRules 2.21. sql/insertCiviruleTrigger.sql looks like it never existed.
CREATE TABLE IF NOT EXISTS civirule_trigger (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(80) NULL,
label VARCHAR(128) NULL,
object_name VARCHAR(45) NULL,
op VARCHAR(45) NULL,
cron TINYINT NULL DEFAULT 0,
class_name VARCHAR(128) NULL,
is_active TINYINT NULL DEFAULT 1,
created_date DATE NULL,
created_user_id INT NULL,
modified_date DATE NULL,
modified_user_id INT NULL,
PRIMARY KEY (id),
UNIQUE INDEX id_UNIQUE (id ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
Agileware Ref: CIVIRULES-8
Edited by justinfreeman (Agileware)