Update 15.0.0-16.0.0.sql

This commit is contained in:
UT from dolibit 2022-06-21 19:26:23 +02:00 committed by GitHub
parent eaafa59160
commit 924ef0a7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,8 +287,10 @@ CREATE TABLE llx_facture_fourn_det_rec
multicurrency_total_ttc double(24,8) DEFAULT 0 multicurrency_total_ttc double(24,8) DEFAULT 0
) ENGINE=innodb; ) ENGINE=innodb;
ALTER TABLE llx_facture_fourn_det_rec ADD CONSTRAINT fk_facture_fourn_det_rec_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid); ALTER TABLE llx_facture_fourn_det_rec ADD CONSTRAINT fk_facture_fourn_det_rec_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid);
CREATE TABLE llx_facture_fourn_det_rec_extrafields CREATE TABLE llx_facture_fourn_det_rec_extrafields
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
@ -297,6 +299,7 @@ CREATE TABLE llx_facture_fourn_det_rec_extrafields
import_key varchar(14) -- import key import_key varchar(14) -- import key
) ENGINE=innodb; ) ENGINE=innodb;
ALTER TABLE llx_facture_fourn_det_rec_extrafields ADD INDEX idx_facture_fourn_det_rec_extrafields (fk_object); ALTER TABLE llx_facture_fourn_det_rec_extrafields ADD INDEX idx_facture_fourn_det_rec_extrafields (fk_object);
ALTER TABLE llx_facture_fourn ADD COLUMN fk_fac_rec_source integer; ALTER TABLE llx_facture_fourn ADD COLUMN fk_fac_rec_source integer;
@ -316,6 +319,7 @@ ALTER TABLE llx_advtargetemailing RENAME TO llx_mailing_advtarget;
ALTER TABLE llx_mailing ADD UNIQUE INDEX uk_mailing (titre, entity); ALTER TABLE llx_mailing ADD UNIQUE INDEX uk_mailing (titre, entity);
create table llx_inventory_extrafields create table llx_inventory_extrafields
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
@ -324,6 +328,7 @@ create table llx_inventory_extrafields
import_key varchar(14) -- import key import_key varchar(14) -- import key
) ENGINE=innodb; ) ENGINE=innodb;
ALTER TABLE llx_inventory_extrafields ADD INDEX idx_inventory_extrafields (fk_object); ALTER TABLE llx_inventory_extrafields ADD INDEX idx_inventory_extrafields (fk_object);
ALTER TABLE llx_reception MODIFY COLUMN ref_supplier varchar(128); ALTER TABLE llx_reception MODIFY COLUMN ref_supplier varchar(128);
@ -364,16 +369,19 @@ ALTER TABLE llx_asset ADD COLUMN model_pdf varchar(255) AFTER import_key;
DROP TABLE llx_asset_type; DROP TABLE llx_asset_type;
CREATE TABLE llx_c_asset_disposal_type CREATE TABLE llx_c_asset_disposal_type
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer NOT NULL DEFAULT 1, entity integer NOT NULL DEFAULT 1,
code varchar(16) NOT NULL, code varchar(16) NOT NULL,
label varchar(50) NOT NULL, label varchar(50) NOT NULL,
active integer DEFAULT 1 NOT NULL active integer NOT NULL DEFAULT 1
) ENGINE=innodb; ) ENGINE=innodb;
CREATE TABLE llx_asset_accountancy_codes_economic(
CREATE TABLE llx_asset_accountancy_codes_economic
(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
fk_asset integer, fk_asset integer,
fk_asset_model integer, fk_asset_model integer,
@ -390,7 +398,9 @@ CREATE TABLE llx_asset_accountancy_codes_economic(
fk_user_modif integer fk_user_modif integer
) ENGINE=innodb; ) ENGINE=innodb;
CREATE TABLE llx_asset_accountancy_codes_fiscal(
CREATE TABLE llx_asset_accountancy_codes_fiscal
(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
fk_asset integer, fk_asset integer,
fk_asset_model integer, fk_asset_model integer,
@ -403,7 +413,9 @@ CREATE TABLE llx_asset_accountancy_codes_fiscal(
fk_user_modif integer fk_user_modif integer
) ENGINE=innodb; ) ENGINE=innodb;
CREATE TABLE llx_asset_depreciation_options_economic(
CREATE TABLE llx_asset_depreciation_options_economic
(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
fk_asset integer, fk_asset integer,
fk_asset_model integer, fk_asset_model integer,
@ -423,7 +435,9 @@ CREATE TABLE llx_asset_depreciation_options_economic(
fk_user_modif integer fk_user_modif integer
) ENGINE=innodb; ) ENGINE=innodb;
CREATE TABLE llx_asset_depreciation_options_fiscal(
CREATE TABLE llx_asset_depreciation_options_fiscal
(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
fk_asset integer, fk_asset integer,
fk_asset_model integer, fk_asset_model integer,
@ -442,7 +456,9 @@ CREATE TABLE llx_asset_depreciation_options_fiscal(
fk_user_modif integer fk_user_modif integer
) ENGINE=innodb; ) ENGINE=innodb;
CREATE TABLE llx_asset_depreciation(
CREATE TABLE llx_asset_depreciation
(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
fk_asset integer NOT NULL, fk_asset integer NOT NULL,
@ -460,6 +476,7 @@ CREATE TABLE llx_asset_depreciation(
fk_user_modif integer fk_user_modif integer
) ENGINE=innodb; ) ENGINE=innodb;
CREATE TABLE llx_asset_model( CREATE TABLE llx_asset_model(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id entity integer DEFAULT 1 NOT NULL, -- multi company id
@ -487,6 +504,7 @@ CREATE TABLE llx_asset_model_extrafields
import_key varchar(14) -- import key import_key varchar(14) -- import key
) ENGINE=innodb; ) ENGINE=innodb;
ALTER TABLE llx_c_asset_disposal_type ADD UNIQUE INDEX uk_c_asset_disposal_type(code, entity); ALTER TABLE llx_c_asset_disposal_type ADD UNIQUE INDEX uk_c_asset_disposal_type(code, entity);
ALTER TABLE llx_asset ADD INDEX idx_asset_fk_asset_model (fk_asset_model); ALTER TABLE llx_asset ADD INDEX idx_asset_fk_asset_model (fk_asset_model);
@ -585,6 +603,7 @@ ALTER TABLE llx_c_payment_term ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NU
ALTER TABLE llx_societe ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER cond_reglement; ALTER TABLE llx_societe ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER cond_reglement;
ALTER TABLE llx_propal ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement; ALTER TABLE llx_propal ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement;
ALTER TABLE llx_commande ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement; ALTER TABLE llx_commande ADD COLUMN deposit_percent VARCHAR(63) DEFAULT NULL AFTER fk_cond_reglement;
INSERT INTO llx_c_payment_term(code, sortorder, active, libelle, libelle_facture, type_cdr, nbjour, deposit_percent) values ('DEP30PCTDEL', 13, 0, '__DEPOSIT_PERCENT__% deposit', '__DEPOSIT_PERCENT__% deposit, remainder on delivery', 0, 1, '30'); INSERT INTO llx_c_payment_term(code, sortorder, active, libelle, libelle_facture, type_cdr, nbjour, deposit_percent) values ('DEP30PCTDEL', 13, 0, '__DEPOSIT_PERCENT__% deposit', '__DEPOSIT_PERCENT__% deposit, remainder on delivery', 0, 1, '30');