Fix: entity is in key so must be after unique key.
This commit is contained in:
parent
57553de815
commit
947af2341b
@ -124,9 +124,9 @@ ALTER TABLE llx_categorie_association ADD UNIQUE INDEX uk_categorie_association
|
|||||||
ALTER TABLE llx_categorie_association ADD UNIQUE INDEX uk_categorie_association_fk_categorie_fille (fk_categorie_fille);
|
ALTER TABLE llx_categorie_association ADD UNIQUE INDEX uk_categorie_association_fk_categorie_fille (fk_categorie_fille);
|
||||||
|
|
||||||
-- Multi company
|
-- Multi company
|
||||||
ALTER TABLE llx_const ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER tms;
|
ALTER TABLE llx_const ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER name;
|
||||||
ALTER TABLE llx_user ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER lang;
|
ALTER TABLE llx_user ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER login;
|
||||||
ALTER TABLE llx_usergroup ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER note;
|
ALTER TABLE llx_usergroup ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER nom;
|
||||||
|
|
||||||
ALTER TABLE llx_const DROP INDEX name;
|
ALTER TABLE llx_const DROP INDEX name;
|
||||||
ALTER TABLE llx_user DROP INDEX uk_user_login;
|
ALTER TABLE llx_user DROP INDEX uk_user_login;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
-- Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
-- Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 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
|
||||||
@ -29,12 +29,12 @@ create table llx_const
|
|||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
name varchar(255),
|
name varchar(255),
|
||||||
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
value text, -- max 65535 caracteres
|
value text, -- max 65535 caracteres
|
||||||
type varchar(6),
|
type varchar(6),
|
||||||
visible tinyint DEFAULT 1 NOT NULL,
|
visible tinyint DEFAULT 1 NOT NULL,
|
||||||
note text,
|
note text,
|
||||||
tms timestamp,
|
tms timestamp
|
||||||
entity integer DEFAULT 1 NOT NULL -- multi company id
|
|
||||||
) type=innodb;
|
) type=innodb;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2007-2009 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 2007-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
|
||||||
@ -26,6 +26,7 @@ create table llx_user
|
|||||||
datec datetime,
|
datec datetime,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
login varchar(24) NOT NULL,
|
login varchar(24) NOT NULL,
|
||||||
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
pass varchar(32),
|
pass varchar(32),
|
||||||
pass_crypted varchar(128),
|
pass_crypted varchar(128),
|
||||||
pass_temp varchar(32), -- temporary password when asked for forget password
|
pass_temp varchar(32), -- temporary password when asked for forget password
|
||||||
@ -49,9 +50,8 @@ create table llx_user
|
|||||||
datepreviouslogin datetime,
|
datepreviouslogin datetime,
|
||||||
egroupware_id integer,
|
egroupware_id integer,
|
||||||
ldap_sid varchar(255) DEFAULT NULL,
|
ldap_sid varchar(255) DEFAULT NULL,
|
||||||
statut tinyint DEFAULT 1,
|
statut tinyint DEFAULT 1,
|
||||||
lang varchar(6),
|
lang varchar(6)
|
||||||
entity integer DEFAULT 1 NOT NULL -- multi company id
|
|
||||||
)type=innodb;
|
)type=innodb;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
-- 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
|
||||||
@ -23,11 +23,11 @@
|
|||||||
create table llx_usergroup
|
create table llx_usergroup
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
nom varchar(255) NOT NULL,
|
||||||
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
datec datetime,
|
datec datetime,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
nom varchar(255) NOT NULL,
|
note text
|
||||||
note text,
|
|
||||||
entity integer DEFAULT 1 NOT NULL -- multi company id
|
|
||||||
)type=innodb;
|
)type=innodb;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user