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
20950d78
Commit
20950d78
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Clean corrupted data to avoid migration errors
parent
117bde13
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/3.1.0-3.2.0.sql
+2
-0
2 additions, 0 deletions
htdocs/install/mysql/migration/3.1.0-3.2.0.sql
htdocs/install/mysql/migration/repair.sql
+3
-0
3 additions, 0 deletions
htdocs/install/mysql/migration/repair.sql
with
5 additions
and
0 deletions
htdocs/install/mysql/migration/3.1.0-3.2.0.sql
+
2
−
0
View file @
20950d78
...
...
@@ -27,6 +27,8 @@ update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid
update
llx_fichinter
set
fk_projet
=
null
where
fk_projet
not
in
(
select
rowid
from
llx_projet
);
update
llx_projet_task
set
fk_projet
=
null
where
fk_projet
not
in
(
select
rowid
from
llx_projet
);
update
llx_commande
set
fk_user_author
=
null
where
fk_user_author
not
in
(
select
rowid
from
llx_user
);
ALTER
TABLE
llx_extrafields
ADD
COLUMN
TYPE
VARCHAR
(
8
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/install/mysql/migration/repair.sql
+
3
−
0
View file @
20950d78
...
...
@@ -34,6 +34,9 @@ update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid
update
llx_fichinter
set
fk_projet
=
null
where
fk_projet
not
in
(
select
rowid
from
llx_projet
);
update
llx_projet_task
set
fk_projet
=
null
where
fk_projet
not
in
(
select
rowid
from
llx_projet
);
update
llx_commande
set
fk_user_author
=
null
where
fk_user_author
not
in
(
select
rowid
from
llx_user
);
DELETE
FROM
llx_boxes
where
box_id
NOT
IN
(
SELECT
rowid
FROM
llx_boxes_def
);
-- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.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