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
03718e0f
Commit
03718e0f
authored
12 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Clean database to allow constraints
parent
fbab99b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
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
with
2 additions
and
0 deletions
htdocs/install/mysql/migration/3.1.0-3.2.0.sql
+
2
−
0
View file @
03718e0f
...
...
@@ -156,6 +156,8 @@ ALTER TABLE llx_categorie_fournisseur DROP INDEX fk_categorie;
ALTER
TABLE
llx_categorie_fournisseur
ADD
PRIMARY
KEY
pk_categorie_fournisseur
(
fk_categorie
,
fk_societe
);
ALTER
TABLE
llx_categorie_fournisseur
ADD
INDEX
idx_categorie_fournisseur_fk_categorie
(
fk_categorie
);
ALTER
TABLE
llx_categorie_fournisseur
ADD
INDEX
idx_categorie_fournisseur_fk_societe
(
fk_societe
);
DELETE
FROM
llx_categorie_fournisseur
WHERE
fk_categorie
NOT
IN
(
SELECT
rowid
FROM
llx_categorie
);
DELETE
FROM
llx_categorie_fournisseur
WHERE
fk_societe
NOT
IN
(
SELECT
rowid
FROM
llx_societe
);
ALTER
TABLE
llx_categorie_fournisseur
ADD
CONSTRAINT
fk_categorie_fournisseur_categorie_rowid
FOREIGN
KEY
(
fk_categorie
)
REFERENCES
llx_categorie
(
rowid
);
ALTER
TABLE
llx_categorie_fournisseur
ADD
CONSTRAINT
fk_categorie_fournisseur_fk_soc
FOREIGN
KEY
(
fk_societe
)
REFERENCES
llx_societe
(
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