Skip to content

Commit

Permalink
Fix: Sql syntax for extrafield table of interventions
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 28, 2014
1 parent 8bdf02b commit 22fb37f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 8 deletions.
18 changes: 10 additions & 8 deletions htdocs/install/mysql/migration/3.6.0-3.7.0.sql
Expand Up @@ -995,12 +995,14 @@ ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_datehour (task_d


-- add extrafield on ficheinter lines
CREATE TABLE IF NOT EXISTS `llx_fichinterdet_extrafields` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`fk_object` int(11) NOT NULL,
`import_key` varchar(14) DEFAULT NULL,
PRIMARY KEY (`rowid`),
KEY `idx_ficheinter_extrafields` (`fk_object`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE llx_fichinterdet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb

ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields (fk_object);


20 changes: 20 additions & 0 deletions htdocs/install/mysql/tables/llx_fichinterdet_extrafields.key.sql
@@ -0,0 +1,20 @@
-- ===================================================================
-- Copyright (C) 2013 Florian Henry <florian.henry@open-cocncept.pro>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================


ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields (fk_object);
25 changes: 25 additions & 0 deletions htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql
@@ -0,0 +1,25 @@
-- ===================================================================
-- Copyright (C) 2013 florian Henry <florian.henry@open-concept.pro>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================

CREATE TABLE llx_fichinterdet_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;
1 change: 1 addition & 0 deletions htdocs/install/pgsql/functions/functions.sql
Expand Up @@ -83,6 +83,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_extrafields FOR EACH
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture_fourn FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_fichinter FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_fichinterdet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_livraison FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_localtax FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_menu FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
Expand Down

0 comments on commit 22fb37f

Please sign in to comment.