* FIX backport from sql upgrade of v23 #37874 * FIX drop foreign key before index * FIX missing sql install file * FIX travis error * FIX wrong checking value * FIX phan error * Update categorie.class.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
0734c9e03a
commit
70979b77b9
3 changed files with 7 additions and 2 deletions
|
|
@ -806,7 +806,7 @@ class Categorie extends CommonObject
|
|||
}
|
||||
|
||||
$sql = "DELETE FROM ".$this->db->sanitize(MAIN_DB_PREFIX.$key);
|
||||
$sql .= " WHERE ".$sanitizedvalue." = ".((int) $this->id);
|
||||
$sql .= " WHERE ".$this->db->sanitize($sanitizedvalue)." = ".((int) $this->id);
|
||||
if (!$this->db->query($sql)) {
|
||||
$this->errors[] = $this->db->lasterror();
|
||||
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@
|
|||
|
||||
-- V23 forgotten
|
||||
|
||||
ALTER TABLE llx_categorie_project_task DROP FOREIGN KEY fk_categorie_project_task_rowid;
|
||||
-- VMYSQL4.1 DROP INDEX idx_categorie_project_fk_task ON llx_categorie_project_task;
|
||||
-- VPGSQL8.2 DROP INDEX idx_categorie_project_fk_task;
|
||||
ALTER TABLE llx_categorie_project_task ADD INDEX idx_categorie_project_fk_task (fk_project_task);
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_rowid FOREIGN KEY (fk_project_task) REFERENCES llx_projet_task (rowid);
|
||||
|
||||
-- V24 migration
|
||||
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@ ALTER TABLE llx_categorie_project_task ADD INDEX idx_categorie_project_fk_catego
|
|||
ALTER TABLE llx_categorie_project_task ADD INDEX idx_categorie_project_fk_task (fk_project_task);
|
||||
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_rowid FOREIGN KEY (fk_project_task) REFERENCES llx_projet (rowid);
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_rowid FOREIGN KEY (fk_project_task) REFERENCES llx_projet_task (rowid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue