Merge pull request #16044 from frederic34/supplier_proposal_extrafields_keys

add missing index in extrafields tables of supplier proposal
This commit is contained in:
Laurent Destailleur 2021-01-22 02:10:29 +01:00 committed by GitHub
commit 5cd80015db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 81 additions and 16 deletions

View File

@ -30,6 +30,11 @@
-- Missing in v13 or lower
ALTER TABLE llx_supplier_proposal_extrafields ADD INDEX idx_supplier_proposal_extrafields (fk_object);
ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposaldet_extrafields (fk_object);
ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object);
-- For v14
ALTER TABLE llx_c_availability ADD COLUMN position integer NOT NULL DEFAULT 0;
@ -63,21 +68,21 @@ ALTER TABLE llx_propal DROP FOREIGN KEY llx_propal_fk_warehouse;
CREATE TABLE llx_workstation_workstation(
-- BEGIN MODULEBUILDER FIELDS
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
label varchar(255),
type varchar(7),
note_public text,
entity int DEFAULT 1,
note_private text,
date_creation datetime NOT NULL,
tms timestamp,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),
status smallint NOT NULL,
nb_operators_required integer,
thm_operator_estimated double,
note_private text,
date_creation datetime NOT NULL,
tms timestamp,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
import_key varchar(14),
status smallint NOT NULL,
nb_operators_required integer,
thm_operator_estimated double,
thm_machine_estimated double
-- END MODULEBUILDER FIELDS
) ENGINE=innodb;
@ -88,16 +93,16 @@ ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstatio
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status);
CREATE TABLE llx_workstation_workstation_resource(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
tms timestamp,
fk_resource integer,
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
tms timestamp,
fk_resource integer,
fk_workstation integer
) ENGINE=innodb;
CREATE TABLE llx_workstation_workstation_usergroup(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
tms timestamp,
fk_usergroup integer,
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
tms timestamp,
fk_usergroup integer,
fk_workstation integer
) ENGINE=innodb;

View File

@ -0,0 +1,20 @@
-- ===================================================================
-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.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 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 <https://www.gnu.org/licenses/>.
--
-- ===================================================================
ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object);

View File

@ -0,0 +1,20 @@
-- ===================================================================
-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.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 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 <https://www.gnu.org/licenses/>.
--
-- ===================================================================
ALTER TABLE llx_supplier_proposal_extrafields ADD INDEX idx_supplier_proposal_extrafields (fk_object);

View File

@ -0,0 +1,20 @@
-- ===================================================================
-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.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 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 <https://www.gnu.org/licenses/>.
--
-- ===================================================================
ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposaldet_extrafields (fk_object);