New: early development of multi-company module
This commit is contained in:
parent
828bf22670
commit
b3360827ba
@ -32,6 +32,7 @@ ALTER TABLE llx_expedition ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER re
|
|||||||
ALTER TABLE llx_facture_fourn ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER facnumber;
|
ALTER TABLE llx_facture_fourn ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER facnumber;
|
||||||
ALTER TABLE llx_livraison ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
ALTER TABLE llx_livraison ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
||||||
ALTER TABLE llx_fichinter ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
ALTER TABLE llx_fichinter ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
||||||
|
ALTER TABLE llx_contrat ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref;
|
||||||
|
|
||||||
ALTER TABLE llx_rights_def DROP PRIMARY KEY;
|
ALTER TABLE llx_rights_def DROP PRIMARY KEY;
|
||||||
ALTER TABLE llx_user_param DROP INDEX fk_user;
|
ALTER TABLE llx_user_param DROP INDEX fk_user;
|
||||||
@ -76,3 +77,4 @@ ALTER TABLE llx_expedition ADD UNIQUE INDEX idx_expedition_uk_ref (ref, entity);
|
|||||||
ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref (facnumber, fk_soc, entity);
|
ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref (facnumber, fk_soc, entity);
|
||||||
ALTER TABLE llx_livraison ADD UNIQUE INDEX idx_livraison_uk_ref (ref, entity);
|
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_fichinter ADD UNIQUE INDEX uk_fichinter_ref (ref, entity);
|
||||||
|
ALTER TABLE llx_contrat ADD UNIQUE INDEX uk_contrat_ref (ref, entity);
|
||||||
@ -1,6 +1,7 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -25,6 +26,8 @@
|
|||||||
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.rowid WHERE llx_societe.rowid IS NULL;
|
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.rowid WHERE llx_societe.rowid IS NULL;
|
||||||
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_user ON llx_contrat.fk_user_author = llx_user.rowid WHERE llx_user.rowid IS NULL;
|
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_user ON llx_contrat.fk_user_author = llx_user.rowid WHERE llx_user.rowid IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_contrat ADD UNIQUE INDEX uk_contrat_ref (ref, entity);
|
||||||
|
|
||||||
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc);
|
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc);
|
||||||
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author);
|
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -21,23 +22,25 @@
|
|||||||
|
|
||||||
create table llx_contrat
|
create table llx_contrat
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
ref varchar(30), -- reference de contrat
|
ref varchar(30), -- reference de contrat
|
||||||
tms timestamp,
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
datec datetime, -- date de creation de l'enregistrement
|
tms timestamp,
|
||||||
date_contrat datetime,
|
datec datetime, -- date de creation de l enregistrement
|
||||||
statut smallint DEFAULT 0,
|
date_contrat datetime,
|
||||||
mise_en_service datetime,
|
statut smallint DEFAULT 0,
|
||||||
fin_validite datetime,
|
mise_en_service datetime,
|
||||||
date_cloture datetime,
|
fin_validite datetime,
|
||||||
fk_soc integer NOT NULL,
|
date_cloture datetime,
|
||||||
fk_projet integer,
|
fk_soc integer NOT NULL,
|
||||||
fk_commercial_signature integer NOT NULL, -- obsolete
|
fk_projet integer,
|
||||||
|
fk_commercial_signature integer NOT NULL, -- obsolete
|
||||||
fk_commercial_suivi integer NOT NULL, -- obsolete
|
fk_commercial_suivi integer NOT NULL, -- obsolete
|
||||||
fk_user_author integer NOT NULL default 0,
|
fk_user_author integer NOT NULL default 0,
|
||||||
fk_user_mise_en_service integer,
|
fk_user_mise_en_service integer,
|
||||||
fk_user_cloture integer,
|
fk_user_cloture integer,
|
||||||
note text,
|
note text,
|
||||||
note_public text
|
note_public text
|
||||||
|
|
||||||
)type=innodb;
|
)type=innodb;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user