Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 12.01 from 12.0 crash #14241

Closed
p-abella opened this issue Jul 14, 2020 · 1 comment
Closed

Upgrade to 12.01 from 12.0 crash #14241

p-abella opened this issue Jul 14, 2020 · 1 comment
Labels
Bug This is a bug (something does not work as expected)

Comments

@p-abella
Copy link

Screenshot_2020-07-14 Dolibarr install or upgrade_2
Screenshot_2020-07-14 Dolibarr install or upgrade

Instructions

This is a template to help you report good issues. You may use Github Markdown syntax to format your issue report.
Please:

  • replace the bracket enclosed texts with meaningful information
  • remove any unused sub-section

Bug

Update procedure to go to version 12.01 from 12.0 crashes on updating database tables

Environment

  • Version: 12.0
  • OS: Lubuntu 20.04
  • Web server: Apache/2.4.41 (Ubuntu)
  • PHP: PHP version: 7.4.7
  • Database: MySQL 8.0.20-0ubuntu0.20.04.1 - (Ubuntu)
  • URL(s): [Affected URL(s)]

Expected and actual behavior

Automatic update procedure should update tables if required

Steps to reproduce the behavior

I have copied the Dolibarr 12.0.1 files into the Dolibarr server directory, and when loading the dolibarr page, the update procedure starts updating the required issues.
This procedure crashes trying to add some constraints because those are already implemented in the referenced tables (see attached pictures).
The errors are:
1.- Error DB_ERROR_1826: ALTER TABLE dolibarr_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES dolibarr_actioncomm (id);
Duplicate foreign key constraint name 'fk_categorie_actioncomm_fk_actioncomm'
2.- Error DB_ERROR_1826: ALTER TABLE dolibarr_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES dolibarr_categorie (rowid);
Duplicate foreign key constraint name 'fk_categorie_actioncomm_categorie_rowid'
3.- Error DB_ERROR_1826: ALTER TABLE dolibarr_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES dolibarr_actioncomm (id);
Duplicate foreign key constraint name 'fk_categorie_actioncomm_fk_actioncomm'
4.- Error DB_ERROR_1826: ALTER TABLE dolibarr_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_website_page_rowid FOREIGN KEY (fk_website_page) REFERENCES dolibarr_website_page (rowid);
Duplicate foreign key constraint name 'fk_categorie_website_page_website_page_rowid'
5.- Error DB_ERROR_1826: ALTER TABLE dolibarr_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_website_page_rowid FOREIGN KEY (fk_website_page) REFERENCES dolibarr_website_page (rowid);
Duplicate foreign key constraint name 'fk_categorie_website_page_website_page_rowid'
6.- Error DB_ERROR_1826: ALTER TABLE dolibarr_commandedet ADD CONSTRAINT fk_commandedet_fk_commandefourndet FOREIGN KEY (fk_commandefourndet) REFERENCES dolibarr_commande_fournisseurdet (rowid);
Duplicate foreign key constraint name 'fk_commandedet_fk_commandefourndet'

Attached files (Screenshots, screencasts, dolibarr.log, debugging informations…)

[Files]

@p-abella p-abella added the Bug This is a bug (something does not work as expected) label Jul 14, 2020
@loxK
Copy link
Contributor

loxK commented Jul 15, 2020

It happens to me too on MySQL 8

@eldy eldy closed this as completed in 521c467 Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants