Skip to content
Snippets Groups Projects
Commit c49c23df authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix debug project categories

parent 64351f34
No related branches found
No related tags found
No related merge requests found
...@@ -458,7 +458,7 @@ class Categorie extends CommonObject ...@@ -458,7 +458,7 @@ class Categorie extends CommonObject
$this->db->begin(); $this->db->begin();
/* FIX #1317 : Check for child cat and move up 1 level*/ /* FIX #1317 : Check for child category and move up 1 level*/
if (! $error) if (! $error)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."categorie"; $sql = "UPDATE ".MAIN_DB_PREFIX."categorie";
...@@ -524,7 +524,7 @@ class Categorie extends CommonObject ...@@ -524,7 +524,7 @@ class Categorie extends CommonObject
if (! $error) if (! $error)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_project"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_project";
$sql .= " WHERE fk_category = ".$this->id; $sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql)) if (!$this->db->query($sql))
{ {
$this->error=$this->db->lasterror(); $this->error=$this->db->lasterror();
......
...@@ -46,4 +46,20 @@ ALTER TABLE llx_notify ADD COLUMN type_target varchar(16) NULL; ...@@ -46,4 +46,20 @@ ALTER TABLE llx_notify ADD COLUMN type_target varchar(16) NULL;
ALTER TABLE llx_entrepot DROP COLUMN valo_pmp; ALTER TABLE llx_entrepot DROP COLUMN valo_pmp;
ALTER TABLE llx_notify_def MODIFY COLUMN fk_soc integer NULL; ALTER TABLE llx_notify_def MODIFY COLUMN fk_soc integer NULL;
-- VPGSQL8.2 ALTER TABLE llx_notify_def ALTER COLUMN fk_soc SET DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_notify_def ALTER COLUMN fk_soc SET DEFAULT NULL;
\ No newline at end of file
create table llx_categorie_project
(
fk_categorie integer NOT NULL,
fk_project integer NOT NULL,
import_key varchar(14)
)ENGINE=innodb;
ALTER TABLE llx_categorie_project ADD PRIMARY KEY pk_categorie_project (fk_categorie, fk_project);
ALTER TABLE llx_categorie_project ADD INDEX idx_categorie_project_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_project ADD INDEX idx_categorie_project_fk_project (fk_project);
ALTER TABLE llx_categorie_project ADD CONSTRAINT fk_categorie_project_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_project ADD CONSTRAINT fk_categorie_project_fk_project_rowid FOREIGN KEY (fk_project) REFERENCES llx_projet (rowid);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment