Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
495ba00c
Commit
495ba00c
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Slurp, database corruption due to missing unique key on main key.
parent
317df1cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/install/mysql/migration/4.0.0-5.0.0.sql
+11
-0
11 additions, 0 deletions
htdocs/install/mysql/migration/4.0.0-5.0.0.sql
htdocs/install/mysql/tables/llx_expensereport.key.sql
+36
-0
36 additions, 0 deletions
htdocs/install/mysql/tables/llx_expensereport.key.sql
with
47 additions
and
0 deletions
htdocs/install/mysql/migration/4.0.0-5.0.0.sql
+
11
−
0
View file @
495ba00c
...
...
@@ -219,6 +219,15 @@ create table llx_user_employment
)
ENGINE
=
innodb
;
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_date_debut
(
date_debut
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_date_fin
(
date_fin
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_statut
(
fk_statut
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_user_author
(
fk_user_author
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_user_valid
(
fk_user_valid
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_user_approve
(
fk_user_approve
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_refuse
(
fk_user_approve
);
-- Sequence to removed duplicated values of llx_links. Use serveral times if you still have duplicate.
drop
table
tmp_links_double
;
...
...
@@ -230,5 +239,7 @@ drop table tmp_links_double;
ALTER
TABLE
llx_links
ADD
UNIQUE
INDEX
uk_links
(
objectid
,
label
);
ALTER
TABLE
llx_expensereport
ADD
UNIQUE
INDEX
idx_expensereport_uk_ref
(
ref
,
entity
);
UPDATE
llx_projet_task
SET
ref
=
NULL
WHERE
ref
=
''
;
ALTER
TABLE
llx_projet_task
ADD
UNIQUE
INDEX
uk_projet_task_ref
(
ref
,
entity
);
This diff is collapsed.
Click to expand it.
htdocs/install/mysql/tables/llx_expensereport.key.sql
0 → 100644
+
36
−
0
View file @
495ba00c
-- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2008-2010 Regis Houssin <regis.houssin@capnetworks.com>
--
-- 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 3 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, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
ALTER
TABLE
llx_expensereport
ADD
UNIQUE
INDEX
idx_expensereport_uk_ref
(
ref
,
entity
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_date_debut
(
date_debut
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_date_fin
(
date_fin
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_statut
(
fk_statut
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_user_author
(
fk_user_author
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_user_valid
(
fk_user_valid
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_user_approve
(
fk_user_approve
);
ALTER
TABLE
llx_expensereport
ADD
INDEX
idx_expensereport_fk_refuse
(
fk_user_approve
);
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_user_approve FOREIGN KEY (fk_user_approve) REFERENCES llx_user (rowid);
--ALTER TABLE llx_expensereport ADD CONSTRAINT fk_expensereport_fk_refuse FOREIGN KEY (fk_user_refuse) REFERENCES llx_user (rowid);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment