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
de5368e6
Commit
de5368e6
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Clean orphelins before creating foreign key
parent
2e11263e
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/2.7.0-2.8.0.sql
+3
-0
3 additions, 0 deletions
htdocs/install/mysql/migration/2.7.0-2.8.0.sql
htdocs/install/mysql/migration/2.8.0-2.9.0.sql
+4
-0
4 additions, 0 deletions
htdocs/install/mysql/migration/2.8.0-2.9.0.sql
with
7 additions
and
0 deletions
htdocs/install/mysql/migration/2.7.0-2.8.0.sql
+
3
−
0
View file @
de5368e6
...
...
@@ -141,6 +141,9 @@ ALTER TABLE llx_projet_task DROP INDEX statut;
ALTER
TABLE
llx_projet_task
ADD
INDEX
idx_projet_task_fk_projet
(
fk_projet
);
ALTER
TABLE
llx_projet_task
ADD
INDEX
idx_projet_task_fk_user_creat
(
fk_user_creat
);
ALTER
TABLE
llx_projet_task
ADD
INDEX
idx_projet_task_fk_user_valid
(
fk_user_valid
);
-- V4.1 DELETE FROM llx_projet_task WHERE fk_projet NOT IN (SELECT rowid from llx_projet);
-- V4.1 UPDATE llx_projet_task set fk_user_creat=NULL WHERE fk_user_creat IS NOT NULL AND fk_user_creat NOT IN (SELECT rowid from llx_user);
-- V4.1 UPDATE llx_projet_task set fk_user_valid=NULL WHERE fk_user_valid IS NOT NULL AND fk_user_valid NOT IN (SELECT rowid from llx_user);
ALTER
TABLE
llx_projet_task
ADD
CONSTRAINT
fk_projet_task_fk_projet
FOREIGN
KEY
(
fk_projet
)
REFERENCES
llx_projet
(
rowid
);
ALTER
TABLE
llx_projet_task
ADD
CONSTRAINT
fk_projet_task_fk_user_creat
FOREIGN
KEY
(
fk_user_creat
)
REFERENCES
llx_user
(
rowid
);
ALTER
TABLE
llx_projet_task
ADD
CONSTRAINT
fk_projet_task_fk_user_valid
FOREIGN
KEY
(
fk_user_valid
)
REFERENCES
llx_user
(
rowid
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/install/mysql/migration/2.8.0-2.9.0.sql
+
4
−
0
View file @
de5368e6
...
...
@@ -7,6 +7,10 @@
--
-- V4.1 DELETE FROM llx_projet_task WHERE fk_projet NOT IN (SELECT rowid from llx_projet);
-- V4.1 UPDATE llx_projet_task set fk_user_creat=NULL WHERE fk_user_creat IS NOT NULL AND fk_user_creat NOT IN (SELECT rowid from llx_user);
-- V4.1 UPDATE llx_projet_task set fk_user_valid=NULL WHERE fk_user_valid IS NOT NULL AND fk_user_valid NOT IN (SELECT rowid from llx_user);
-- rename llx_product_det
ALTER
TABLE
llx_product_det
RENAME
TO
llx_product_lang
;
ALTER
TABLE
llx_product_lang
ADD
UNIQUE
INDEX
uk_product_lang
(
fk_product
,
lang
);
...
...
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