mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Suffix more tables to have more tables created only if needed.
This commit is contained in:
parent
cf912c53d2
commit
08f43cbd42
|
|
@ -25,4 +25,3 @@ ALTER TABLE llx_bom_bom ADD INDEX idx_bom_bom_fk_product (fk_product);
|
|||
ALTER TABLE llx_bom_bom ADD UNIQUE INDEX uk_bom_bom_ref(ref, entity);
|
||||
|
||||
--ALTER TABLE llx_bom_bom ADD CONSTRAINT llx_bom_bom_fk_field FOREIGN KEY (fk_field) REFERENCES llx_bom_myotherobject(rowid);
|
||||
|
||||
|
|
@ -19,24 +19,24 @@ CREATE TABLE llx_bom_bom(
|
|||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
ref varchar(128) NOT NULL,
|
||||
bomtype integer DEFAULT 0, -- 0 for a BOM to manufacture, 1 for a BOM to dismantle
|
||||
label varchar(255),
|
||||
fk_product integer,
|
||||
description text,
|
||||
note_public text,
|
||||
note_private text,
|
||||
bomtype integer DEFAULT 0, -- 0 for a BOM to manufacture, 1 for a BOM to dismantle
|
||||
label varchar(255),
|
||||
fk_product integer,
|
||||
description text,
|
||||
note_public text,
|
||||
note_private text,
|
||||
fk_warehouse integer,
|
||||
qty double(24,8),
|
||||
efficiency double(24,8) DEFAULT 1,
|
||||
duration double(24,8) DEFAULT NULL,
|
||||
date_creation datetime NOT NULL,
|
||||
date_valid datetime,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
fk_user_valid integer,
|
||||
fk_user_modif integer,
|
||||
fk_user_valid integer,
|
||||
import_key varchar(14),
|
||||
model_pdf varchar(255),
|
||||
status integer NOT NULL
|
||||
model_pdf varchar(255),
|
||||
status integer NOT NULL
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
|
@ -20,4 +20,3 @@ create table llx_bom_bom_extrafields
|
|||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
|
@ -23,4 +23,3 @@ ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_fk_bom (fk_bom);
|
|||
--ALTER TABLE llx_bom_bomline ADD UNIQUE INDEX uk_bom_bomline_fieldxy(fieldx, fieldy);
|
||||
|
||||
ALTER TABLE llx_bom_bomline ADD CONSTRAINT llx_bom_bomline_fk_bom FOREIGN KEY (fk_bom) REFERENCES llx_bom_bom(rowid);
|
||||
|
||||
|
|
@ -15,16 +15,16 @@
|
|||
|
||||
CREATE TABLE llx_bom_bomline(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_bom integer NOT NULL,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_bom integer NOT NULL,
|
||||
fk_product integer NOT NULL,
|
||||
fk_bom_child integer NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
description text,
|
||||
import_key varchar(14),
|
||||
qty double(24,8) NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
description text,
|
||||
import_key varchar(14),
|
||||
qty double(24,8) NOT NULL,
|
||||
qty_frozen smallint DEFAULT 0,
|
||||
disable_stock_change smallint DEFAULT 0,
|
||||
disable_stock_change smallint DEFAULT 0,
|
||||
efficiency double(24,8) NOT NULL DEFAULT 1,
|
||||
fk_unit integer NULL,
|
||||
position integer NOT NULL DEFAULT 0,
|
||||
|
|
@ -20,4 +20,3 @@ create table llx_bom_bomline_extrafields
|
|||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
|
@ -23,5 +23,5 @@ CREATE TABLE llx_c_productbatch_qcstatus
|
|||
entity integer NOT NULL DEFAULT 1,
|
||||
code varchar(16) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
active integer DEFAULT 1 NOT NULL
|
||||
active integer DEFAULT 1 NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
|
@ -15,8 +15,9 @@
|
|||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
--
|
||||
-- Table with the custom category tree for the category of a ticket
|
||||
--
|
||||
-- Table with the custom group tree for the group of a ticket.
|
||||
-- This is for classification. It is different of the tag/category table.
|
||||
--
|
||||
|
||||
create table llx_c_ticket_category
|
||||
(
|
||||
|
|
@ -30,4 +30,3 @@ ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_project (fk_project);
|
|||
--ALTER TABLE llx_mrp_mo ADD UNIQUE INDEX uk_mrp_mo_fieldxy(fieldx, fieldy);
|
||||
|
||||
--ALTER TABLE llx_mrp_mo ADD CONSTRAINT llx_mrp_mo_fk_field FOREIGN KEY (fk_field) REFERENCES llx_mrp_myotherobject(rowid);
|
||||
|
||||
|
|
@ -16,29 +16,29 @@
|
|||
|
||||
CREATE TABLE llx_mrp_mo(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||
mrptype integer DEFAULT 0, -- 0 for a manufacture MO, 1 for a dismantle MO
|
||||
label varchar(255),
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||
mrptype integer DEFAULT 0, -- 0 for a manufacture MO, 1 for a dismantle MO
|
||||
label varchar(255),
|
||||
qty real NOT NULL,
|
||||
fk_warehouse integer,
|
||||
fk_soc integer,
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
fk_soc integer,
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
date_valid datetime NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
fk_user_valid integer,
|
||||
import_key varchar(14),
|
||||
model_pdf varchar(255),
|
||||
status integer NOT NULL,
|
||||
fk_product integer NOT NULL,
|
||||
date_start_planned datetime,
|
||||
date_end_planned datetime,
|
||||
fk_bom integer,
|
||||
status integer NOT NULL,
|
||||
fk_product integer NOT NULL,
|
||||
date_start_planned datetime,
|
||||
date_end_planned datetime,
|
||||
fk_bom integer,
|
||||
fk_project integer,
|
||||
last_main_doc varchar(255),
|
||||
fk_parent_line integer
|
||||
|
|
@ -20,4 +20,3 @@ create table llx_mrp_mo_extrafields
|
|||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
|
@ -18,4 +18,3 @@ ALTER TABLE llx_mrp_production ADD CONSTRAINT fk_mrp_production_product FOREIGN
|
|||
ALTER TABLE llx_mrp_production ADD CONSTRAINT fk_mrp_production_stock_movement FOREIGN KEY (fk_stock_movement) REFERENCES llx_stock_mouvement (rowid);
|
||||
|
||||
ALTER TABLE llx_mrp_production ADD INDEX idx_mrp_production_fk_mo (fk_mo);
|
||||
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
|
||||
|
||||
CREATE TABLE llx_mrp_production(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_mo integer NOT NULL,
|
||||
origin_id integer,
|
||||
origin_type varchar(10), -- 'bom' bom production line or 'free' free production line added after Mo creation from bom
|
||||
position integer NOT NULL DEFAULT 0,
|
||||
fk_product integer NOT NULL,
|
||||
fk_product integer NOT NULL,
|
||||
fk_warehouse integer,
|
||||
qty real NOT NULL DEFAULT 1,
|
||||
qty_frozen smallint DEFAULT 0,
|
||||
|
|
@ -29,12 +29,11 @@ CREATE TABLE llx_mrp_production(
|
|||
role varchar(10), -- 'toconsume' or 'toproduce' (initialized at MO creation), 'consumed' or 'produced' (added after MO validation)
|
||||
fk_mrp_production integer, -- if role = 'consumed', id of line with role 'toconsume', if role = 'produced' id of line with role 'toproduce'
|
||||
fk_stock_movement integer, -- id of stock movement when movements are validated
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
fk_default_workstation integer DEFAULT NULL,
|
||||
fk_unit integer DEFAULT NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
|
@ -19,4 +19,4 @@ create table llx_mrp_production_extrafields
|
|||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
) ENGINE=innodb;
|
||||
Loading…
Reference in New Issue
Block a user