From 7faa90e831820cc1770c52694ead77762d1e6711 Mon Sep 17 00:00:00 2001 From: simnandez Date: Sat, 6 Oct 2012 09:52:33 +0200 Subject: [PATCH] New: More import options. Prepare database --- htdocs/install/mysql/migration/3.2.0-3.3.0.sql | 6 ++++++ .../install/mysql/tables/llx_commande_fournisseurdet.sql | 9 +++++---- htdocs/install/mysql/tables/llx_entrepot.sql | 8 +++++--- .../mysql/tables/llx_product_fournisseur_price.sql | 4 +++- htdocs/install/mysql/tables/llx_product_stock.sql | 8 +++++--- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index 81922a2b4b9..4e7ca041820 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -759,3 +759,9 @@ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps -- Add possibility to defined position/job of a user ALTER TABLE llx_user ADD COLUMN job varchar(128) AFTER firstname; + +-- New Imports +ALTER TABLE llx_commande_fournisseurdet ADD COLUMN import_key varchar(14) AFTER info_bits; +ALTER TABLE llx_entrepot ADD COLUMN import_key varchar(14) AFTER fk_user_author; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN import_key varchar(14) AFTER fk_user; +ALTER TABLE llx_product_stock ADD COLUMN import_key varchar(14) AFTER pmp; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql index 6c4ecd15798..047593a9cfa 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql @@ -1,7 +1,7 @@ -- =================================================================== --- Copyright (C) 2007 Rodolphe Quiedeville --- Copyright (C) 2007-2009 Laurent Destailleur --- Copyright (C) 2010 Juanjo Menent +-- Copyright (C) 2007 Rodolphe Quiedeville +-- Copyright (C) 2007-2009 Laurent Destailleur +-- Copyright (C) 2010-2012 Juanjo Menent -- -- 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 @@ -43,5 +43,6 @@ create table llx_commande_fournisseurdet product_type integer DEFAULT 0, date_start datetime DEFAULT NULL, -- date debut si service date_end datetime DEFAULT NULL, -- date fin si service - info_bits integer DEFAULT 0 -- TVA NPR ou non + info_bits integer DEFAULT 0, -- TVA NPR ou non + import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_entrepot.sql b/htdocs/install/mysql/tables/llx_entrepot.sql index 1f6691236d8..881c472bdad 100644 --- a/htdocs/install/mysql/tables/llx_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_entrepot.sql @@ -1,6 +1,7 @@ -- ============================================================================ --- Copyright (C) 2003-2006 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur +-- Copyright (C) 2003-2006 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- Copyright (C) 2012 Juanjo Menent -- -- 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 @@ -33,5 +34,6 @@ create table llx_entrepot fk_pays integer DEFAULT 0, statut tinyint DEFAULT 1, -- 1 open, 0 close valo_pmp float(12,4), -- valoristaion du stock en PMP - fk_user_author integer + fk_user_author integer, + import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index 5f497232312..a6cb81527a6 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -2,6 +2,7 @@ -- Copyright (C) 2003 Rodolphe Quiedeville -- Copyright (C) 2009-2011 Laurent Destailleur -- Copyright (C) 2009-2012 Regis Houssin +-- Copyright (C) 2012 Juanjo Menent -- -- 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 @@ -34,5 +35,6 @@ create table llx_product_fournisseur_price charges double(24,8) DEFAULT 0, unitcharges double(24,8) DEFAULT 0, tva_tx double(6,3) NOT NULL, - fk_user integer + fk_user integer, + import_key varchar(14) -- Import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_stock.sql b/htdocs/install/mysql/tables/llx_product_stock.sql index e6628731cad..1654363183b 100644 --- a/htdocs/install/mysql/tables/llx_product_stock.sql +++ b/htdocs/install/mysql/tables/llx_product_stock.sql @@ -1,6 +1,7 @@ -- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2009 Laurent Destailleur +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2009 Laurent Destailleur +-- Copyright (C) 2012 Juanjo Menent -- -- 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 @@ -24,6 +25,7 @@ create table llx_product_stock fk_product integer NOT NULL, fk_entrepot integer NOT NULL, reel real, -- physical stock - pmp double(24,8) default 0 NOT NULL -- PMP value for product in this warehouse + pmp double(24,8) default 0 NOT NULL, -- PMP value for product in this warehouse + import_key varchar(14) -- Import key )ENGINE=innodb;