forked from Wavyzz/dolibarr
New: early development of multi-company module
This commit is contained in:
@@ -57,6 +57,7 @@ ALTER TABLE llx_c_barcode_type ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTE
|
||||
ALTER TABLE llx_dolibarr_modules ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER numero;
|
||||
ALTER TABLE llx_bank_categ ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER label;
|
||||
ALTER TABLE llx_bordereau_cheque ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER number;
|
||||
ALTER TABLE llx_prelevement_bons ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
||||
|
||||
ALTER TABLE llx_rights_def DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_user_param DROP INDEX fk_user;
|
||||
@@ -80,6 +81,7 @@ ALTER TABLE llx_livraison DROP INDEX idx_expedition_uk_ref;
|
||||
ALTER TABLE llx_livraison DROP INDEX idx_livraison_uk_ref;
|
||||
ALTER TABLE llx_fichinter DROP INDEX ref;
|
||||
ALTER TABLE llx_dolibarr_modules DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_prelevement_bons DROP INDEX ref;
|
||||
|
||||
ALTER TABLE llx_rights_def ADD PRIMARY KEY (id, entity);
|
||||
ALTER TABLE llx_user_param ADD UNIQUE INDEX uk_user_param (fk_user,param,entity);
|
||||
@@ -105,6 +107,7 @@ ALTER TABLE llx_fichinter ADD UNIQUE INDEX uk_fichinter_ref (ref, entity);
|
||||
ALTER TABLE llx_contrat ADD UNIQUE INDEX uk_contrat_ref (ref, entity);
|
||||
ALTER TABLE llx_dolibarr_modules ADD PRIMARY KEY pk_dolibarr_modules (numero, entity);
|
||||
ALTER TABLE llx_bordereau_cheque ADD UNIQUE INDEX uk_bordereau_cheque (number, entity);
|
||||
ALTER TABLE llx_prelevement_bons ADD UNIQUE INDEX uk_prelevement_bons_ref (ref, entity);
|
||||
|
||||
UPDATE llx_const SET entity=0 WHERE name='MAIN_MODULE_USER' AND entity=1;
|
||||
UPDATE llx_const SET entity=0 WHERE name='MAIN_POPUP_CALENDAR' AND entity=1;
|
||||
|
||||
23
mysql/tables/llx_prelevement_bons.key.sql
Normal file
23
mysql/tables/llx_prelevement_bons.key.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.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 2 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_prelevement_bons ADD UNIQUE INDEX uk_prelevement_bons_ref (ref, entity);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.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
|
||||
@@ -28,6 +29,7 @@ create table llx_prelevement_bons
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
ref varchar(12), -- reference
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
datec datetime, -- date de creation
|
||||
amount real DEFAULT 0, -- montant total du pr<70>l<EFBFBD>vement
|
||||
statut smallint DEFAULT 0, -- statut
|
||||
@@ -37,7 +39,6 @@ create table llx_prelevement_bons
|
||||
method_trans smallint, -- m<>thode de transmission
|
||||
fk_user_trans integer, -- user qui a effectu<74> la transmission
|
||||
date_credit datetime, -- date de cr<63>dit sur le compte
|
||||
fk_user_credit integer, -- user qui a remont<6E> l'info de cr<63>dit
|
||||
|
||||
UNIQUE(ref)
|
||||
fk_user_credit integer -- user qui a remont<6E> l'info de cr<63>dit
|
||||
|
||||
)type=innodb;
|
||||
|
||||
Reference in New Issue
Block a user