Fix: entity is in key so must be after unique key.

This commit is contained in:
Laurent Destailleur 2009-04-20 14:43:34 +00:00
parent 57553de815
commit 947af2341b
4 changed files with 14 additions and 14 deletions

View File

@ -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);
-- Multi company
ALTER TABLE llx_const ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER tms;
ALTER TABLE llx_user ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER lang;
ALTER TABLE llx_usergroup ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER note;
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 login;
ALTER TABLE llx_usergroup ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER nom;
ALTER TABLE llx_const DROP INDEX name;
ALTER TABLE llx_user DROP INDEX uk_user_login;

View File

@ -1,7 +1,7 @@
-- ============================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.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>
--
-- 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,
name varchar(255),
entity integer DEFAULT 1 NOT NULL, -- multi company id
value text, -- max 65535 caracteres
type varchar(6),
visible tinyint DEFAULT 1 NOT NULL,
note text,
tms timestamp,
entity integer DEFAULT 1 NOT NULL -- multi company id
tms timestamp
) type=innodb;
--

View File

@ -1,6 +1,6 @@
-- ============================================================================
-- 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>
--
-- This program is free software; you can redistribute it and/or modify
@ -26,6 +26,7 @@ create table llx_user
datec datetime,
tms timestamp,
login varchar(24) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
pass varchar(32),
pass_crypted varchar(128),
pass_temp varchar(32), -- temporary password when asked for forget password
@ -49,9 +50,8 @@ create table llx_user
datepreviouslogin datetime,
egroupware_id integer,
ldap_sid varchar(255) DEFAULT NULL,
statut tinyint DEFAULT 1,
lang varchar(6),
entity integer DEFAULT 1 NOT NULL -- multi company id
statut tinyint DEFAULT 1,
lang varchar(6)
)type=innodb;
--

View File

@ -1,6 +1,6 @@
-- ============================================================================
-- 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>
--
-- This program is free software; you can redistribute it and/or modify
@ -23,11 +23,11 @@
create table llx_usergroup
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
nom varchar(255) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime,
tms timestamp,
nom varchar(255) NOT NULL,
note text,
entity integer DEFAULT 1 NOT NULL -- multi company id
note text
)type=innodb;
--