Add extra fields table
This commit is contained in:
parent
473345d839
commit
f6e17f934b
23
htdocs/install/mysql/tables/llx_extra_fields.key.sql
Normal file
23
htdocs/install/mysql/tables/llx_extra_fields.key.sql
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- 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 2 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, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_extra_fields ADD UNIQUE INDEX idx_extra_fields_name (name, entity);
|
||||||
|
|
||||||
37
htdocs/install/mysql/tables/llx_extra_fields.sql
Normal file
37
htdocs/install/mysql/tables/llx_extra_fields.sql
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- 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 2 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, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
create table llx_extra_fields
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
|
|
||||||
|
object varchar(64) NOT NULL,
|
||||||
|
assign integer,
|
||||||
|
name varchar(64) NOT NULL,
|
||||||
|
label varchar(64) NOT NULL,
|
||||||
|
format varchar(8) NOT NULL,
|
||||||
|
fieldsize integer,
|
||||||
|
maxlength integer,
|
||||||
|
options varchar(45),
|
||||||
|
rank integer
|
||||||
|
|
||||||
|
)type=innodb;
|
||||||
24
htdocs/install/mysql/tables/llx_extra_fields_options.key.sql
Normal file
24
htdocs/install/mysql/tables/llx_extra_fields_options.key.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- 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 2 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, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_extra_fields_options ADD INDEX idx_extra_fields_options_fk_extra_fields (fk_extra_fields, entity);
|
||||||
|
|
||||||
|
ALTER TABLE llx_extra_fields_options ADD CONSTRAINT fk_extra_fields_options_fk_extra_fields FOREIGN KEY (fk_extra_fields) REFERENCES llx_extra_fields (rowid);
|
||||||
31
htdocs/install/mysql/tables/llx_extra_fields_options.sql
Normal file
31
htdocs/install/mysql/tables/llx_extra_fields_options.sql
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- 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 2 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, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
create table llx_extra_fields_options
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
|
||||||
|
fk_extra_fields integer NOT NULL,
|
||||||
|
value varchar(255) NOT NULL,
|
||||||
|
|
||||||
|
rank integer
|
||||||
|
|
||||||
|
)type=innodb;
|
||||||
24
htdocs/install/mysql/tables/llx_extra_fields_values.key.sql
Normal file
24
htdocs/install/mysql/tables/llx_extra_fields_values.key.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- 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 2 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, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_extra_fields_values ADD INDEX idx_extra_fields_values_fk_extra_fields (fk_extra_fields, entity);
|
||||||
|
|
||||||
|
ALTER TABLE llx_extra_fields_values ADD CONSTRAINT fk_extra_fields_values_fk_extra_fields FOREIGN KEY (fk_extra_fields) REFERENCES llx_extra_fields (rowid);
|
||||||
36
htdocs/install/mysql/tables/llx_extra_fields_values.sql
Normal file
36
htdocs/install/mysql/tables/llx_extra_fields_values.sql
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
--
|
||||||
|
-- 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 2 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, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
create table llx_extra_fields_values
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
|
|
||||||
|
datec datetime,
|
||||||
|
datem datetime,
|
||||||
|
fk_object integer NOT NULL,
|
||||||
|
fk_extra_fields integer NOT NULL,
|
||||||
|
value varchar(255),
|
||||||
|
|
||||||
|
fk_user_create integer,
|
||||||
|
fk_user_modif integer
|
||||||
|
|
||||||
|
)type=innodb;
|
||||||
@ -19,7 +19,7 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
-- Supprimme orphelins pour permettre montée de la clé
|
-- Supprimme orphelins pour permettre montee de la cle
|
||||||
-- V4 DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL;
|
-- V4 DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn);
|
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user