Add: all tables with a field ref must contain a field entity
This commit is contained in:
parent
edb5dab96c
commit
b543207a83
@ -52,6 +52,7 @@ ALTER TABLE llx_contrat ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
||||
ALTER TABLE llx_c_barcode_type ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER code;
|
||||
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_rights_def DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_user_param DROP INDEX fk_user;
|
||||
@ -99,6 +100,7 @@ ALTER TABLE llx_livraison ADD UNIQUE INDEX idx_livraison_uk_ref (ref, entity);
|
||||
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 (numero, entity);
|
||||
ALTER TABLE llx_bordereau_cheque ADD UNIQUE INDEX (number, 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;
|
||||
|
||||
22
mysql/tables/llx_bordereau_cheque.key.sql
Normal file
22
mysql/tables/llx_bordereau_cheque.key.sql
Normal file
@ -0,0 +1,22 @@
|
||||
-- ============================================================================
|
||||
-- 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_bordereau_cheque ADD UNIQUE INDEX (number, entity);
|
||||
@ -1,5 +1,6 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- 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
|
||||
@ -28,10 +29,12 @@ create table llx_bordereau_cheque
|
||||
datec datetime NOT NULL,
|
||||
date_bordereau date, -- A quoi sert cette date ?
|
||||
number varchar(16) NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
amount double(24,8) NOT NULL,
|
||||
nbcheque smallint NOT NULL,
|
||||
fk_bank_account integer,
|
||||
fk_user_author integer,
|
||||
note text,
|
||||
statut smallint(1) NOT NULL DEFAULT 0
|
||||
|
||||
)type=innodb;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user