forked from Wavyzz/dolibarr
A little clean of tables.
This commit is contained in:
@@ -38,7 +38,7 @@ create table llx_c_email_templates
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
type_template varchar(32), -- template for wich type of email (send invoice by email, send order, ...)
|
||||
type_template varchar(32), -- template for which type of email (send invoice by email, send order, ...)
|
||||
datec datetime,
|
||||
label varchar(255),
|
||||
content text
|
||||
|
||||
@@ -919,4 +919,29 @@ INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype,
|
||||
|
||||
|
||||
DELETE FROM llx_c_departements WHERE fk_region NOT IN (select rowid from llx_c_regions) AND fk_regions IS NOT NULL;
|
||||
|
||||
|
||||
DROP TABLE llx_texts;
|
||||
|
||||
|
||||
DROP TABLE llx_c_email_templates;
|
||||
CREATE table llx_c_email_templates
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
module varchar(32), -- Nom du module en rapport avec le modele
|
||||
type_template varchar(32), -- template for which type of email (send invoice by email, send order, ...)
|
||||
sortorder smallint, -- Ordre affichage
|
||||
|
||||
private smallint DEFAULT 0 NOT NULL, -- Template public or private
|
||||
fk_user integer, -- Id utilisateur si modele prive, sinon null
|
||||
datec datetime,
|
||||
tms timestamp,
|
||||
|
||||
label varchar(255),
|
||||
content text
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE llx_c_departements ADD CONSTRAINT fk_departements_fk_region FOREIGN KEY (fk_region) REFERENCES llx_c_regions (rowid);
|
||||
|
||||
@@ -108,14 +108,6 @@ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps
|
||||
-- VMYSQL DELETE from llx_menu where module = 'margins' and url = '/margin/index.php' and not exists (select * from llx_const where name = 'MAIN_MODULE_MARGIN' or name = 'MAIN_MODULE_MARGINS');
|
||||
|
||||
|
||||
-- Requests to clean old tables or fields
|
||||
|
||||
-- DROP TABLE llx_c_methode_commande_fournisseur;
|
||||
-- DROP TABLE llx_c_source;
|
||||
-- DROP TABLE llx_cond_reglement;
|
||||
-- DROP TABLE llx_expedition_methode;
|
||||
-- DROP TABLE llx_product_fournisseur;
|
||||
-- ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
|
||||
ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur;
|
||||
|
||||
|
||||
@@ -150,3 +142,44 @@ drop table tmp_societe_double;
|
||||
|
||||
|
||||
UPDATE llx_projet_task SET fk_task_parent = 0 WHERE fk_task_parent = rowid
|
||||
|
||||
|
||||
|
||||
|
||||
-- Requests to clean old tables or external modules tables
|
||||
|
||||
-- DROP TABLE llx_c_methode_commande_fournisseur;
|
||||
-- DROP TABLE llx_c_source;
|
||||
-- DROP TABLE llx_congespayes;
|
||||
-- DROP TABLE llx_congespayes_config;
|
||||
-- DROP TABLE llx_congespayes_log;
|
||||
-- DROP TABLE llx_congespayes_events;
|
||||
-- DROP TABLE llx_congespayes_users;
|
||||
-- DROP TABLE llx_compta;
|
||||
-- DROP TABLE llx_compta_compte_generaux;
|
||||
-- DROP TABLE llx_compta_account;
|
||||
-- DROP TABLE llx_cabinetmed*;
|
||||
-- DROP TABLE llx_cond_reglement;
|
||||
-- DROP TABLE llx_expedition_methode;
|
||||
-- DROP TABLE llx_product_fournisseur;
|
||||
-- DROP TABLE llx_element_rang;
|
||||
-- DROP TABLE llx_dolicloud_customers;
|
||||
-- DROP TABLE llx_dolicloud_emailstemplates;
|
||||
-- DROP TABLE llx_dolicloud_stats;
|
||||
-- DROP TABLE llx_submitew_message;
|
||||
-- DROP TABLE llx_submitew_targets;
|
||||
-- DROP TABLE llx_submitew_targets_param;
|
||||
-- DROP TABLE llx_pos_cash;
|
||||
-- DROP TABLE llx_pos_control_cash;
|
||||
-- DROP TABLE llx_pos_facture;
|
||||
-- DROP TABLE llx_pos_moviments;
|
||||
-- DROP TABLE llx_pos_ticketdet;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,15 @@ create table llx_c_email_templates
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
type_template varchar(32), -- template for wich type of email (send invoice by email, send order, ...)
|
||||
module varchar(32), -- Nom du module en rapport avec le modele
|
||||
type_template varchar(32), -- template for which type of email (send invoice by email, send order, ...)
|
||||
sortorder smallint, -- Ordre affichage
|
||||
|
||||
private smallint DEFAULT 0 NOT NULL, -- Template public or private
|
||||
fk_user integer, -- Id utilisateur si modele prive, sinon null
|
||||
datec datetime,
|
||||
tms timestamp,
|
||||
|
||||
label varchar(255),
|
||||
content text
|
||||
)ENGINE=innodb;
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- 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_texts
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
|
||||
module varchar(32), -- Nom du module en rapport avec le modele
|
||||
typemodele varchar(32), -- Type du modele
|
||||
sortorder smallint, -- Ordre affichage
|
||||
|
||||
private smallint DEFAULT 0 NOT NULL, -- Modele publique ou prive
|
||||
fk_user integer, -- Id utilisateur si modele prive, sinon null
|
||||
title varchar(128), -- Titre du modele
|
||||
filename varchar(128), -- Nom fichier si modele fichier
|
||||
content text, -- Texte si modele texte
|
||||
|
||||
tms timestamp
|
||||
)ENGINE=innodb;
|
||||
Reference in New Issue
Block a user