Works on multicompany module
This commit is contained in:
parent
f4d8f852c0
commit
f7815d0c8a
@ -133,10 +133,17 @@ ALTER TABLE llx_bank_categ ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER la
|
||||
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_projet ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
||||
ALTER TABLE llx_adherent ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
|
||||
ALTER TABLE llx_adherent_type ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
|
||||
ALTER TABLE llx_adherent_options_label ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER name;
|
||||
|
||||
ALTER TABLE llx_rights_def DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_dolibarr_modules DROP PRIMARY KEY;
|
||||
|
||||
ALTER TABLE llx_adherent_options_label DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_adherent_options_label MODIFY COLUMN name varchar(64) NOT NULL;
|
||||
ALTER TABLE llx_adherent_options_label ADD COLUMN rowid integer AUTO_INCREMENT PRIMARY KEY FIRST;
|
||||
|
||||
ALTER TABLE llx_user_param DROP INDEX fk_user;
|
||||
ALTER TABLE llx_societe DROP INDEX uk_societe_prefix_comm;
|
||||
ALTER TABLE llx_societe DROP INDEX uk_societe_code_client;
|
||||
@ -160,6 +167,8 @@ ALTER TABLE llx_fichinter DROP INDEX ref;
|
||||
ALTER TABLE llx_prelevement_bons DROP INDEX ref;
|
||||
ALTER TABLE llx_projet DROP INDEX ref;
|
||||
ALTER TABLE llx_boxes_def DROP INDEX uk_boxes_def;
|
||||
ALTER TABLE llx_adherent DROP INDEX uk_adherent_login;
|
||||
ALTER TABLE llx_adherent_type DROP INDEX uk_adherent_type_libelle;
|
||||
|
||||
ALTER TABLE llx_rights_def ADD PRIMARY KEY pk_rights_def (id, entity);
|
||||
ALTER TABLE llx_dolibarr_modules ADD PRIMARY KEY pk_dolibarr_modules (numero, entity);
|
||||
@ -189,6 +198,9 @@ ALTER TABLE llx_bordereau_cheque ADD UNIQUE INDEX uk_bordereau_cheque (number, e
|
||||
ALTER TABLE llx_prelevement_bons ADD UNIQUE INDEX uk_prelevement_bons_ref (ref, entity);
|
||||
ALTER TABLE llx_projet ADD UNIQUE INDEX uk_projet_ref (ref, entity);
|
||||
ALTER TABLE llx_boxes_def ADD UNIQUE INDEX uk_boxes_def (file, entity);
|
||||
ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_login (login, entity);
|
||||
ALTER TABLE llx_adherent_type ADD UNIQUE INDEX uk_adherent_type_libelle (libelle, entity);
|
||||
ALTER TABLE llx_adherent_options_label ADD UNIQUE INDEX uk_adherent_options_label_name (name, entity);
|
||||
|
||||
ALTER TABLE llx_projet ADD INDEX idx_projet_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_projet ADD CONSTRAINT fk_projet_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- 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
|
||||
@ -19,7 +20,7 @@
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_login (login);
|
||||
ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_login (login, entity);
|
||||
ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_fk_soc (fk_soc);
|
||||
|
||||
ALTER TABLE llx_adherent ADD INDEX idx_adherent_fk_soc (fk_soc);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
-- Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- 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,6 +29,7 @@
|
||||
create table llx_adherent
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
nom varchar(50),
|
||||
prenom varchar(50),
|
||||
login varchar(50) NOT NULL, -- login
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.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
|
||||
@ -19,4 +20,5 @@
|
||||
-- $Id$
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_adherent_options ADD INDEX idx_adherent_options (adhid);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.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
|
||||
|
||||
@ -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_adherent_options_label ADD UNIQUE INDEX uk_adherent_options_label_name (name, entity);
|
||||
@ -1,6 +1,7 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.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
|
||||
@ -21,9 +22,11 @@
|
||||
|
||||
create table llx_adherent_options_label
|
||||
(
|
||||
name varchar(64) PRIMARY KEY, -- nom de l'attribut
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
name varchar(64) NOT NULL, -- nom de l'attribut
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
tms timestamp,
|
||||
label varchar(255) NOT NULL, -- label correspondant a l'attribut
|
||||
label varchar(255) NOT NULL, -- label correspondant a l'attribut
|
||||
type varchar(8),
|
||||
size integer DEFAULT 0,
|
||||
pos integer DEFAULT 0
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- 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
|
||||
@ -19,4 +20,4 @@
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_adherent_type ADD UNIQUE uk_adherent_type_libelle (libelle);
|
||||
ALTER TABLE llx_adherent_type ADD UNIQUE INDEX uk_adherent_type_libelle (libelle, entity);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.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
|
||||
@ -26,6 +27,7 @@
|
||||
create table llx_adherent_type
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
tms timestamp,
|
||||
statut smallint NOT NULL DEFAULT 0,
|
||||
libelle varchar(50) NOT NULL,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user