SOLVED: Upgrade 7.0.0 to 8.0.2 - Linux - Help !

I downloaded this…

sourceforge.net/projects/dolibarr/files/Dolibarr%20ERP-CRM/8.0.2/dolibarr-8.0.2.tgz/download

and followed these instructions…

wiki.dolibarr.org/index.php/Installation_-_Upgrade

Doli is installed at /usr/share/dolibarr rather than /var/www/dolibarr - not sure why.

Basically, I put the v7 at ‘/usr/share/dolibarr-8.0.2’ so that I could untar the v8 over it.

Specifically…

$ cd /usr/share /usr/share$ sudo cp -r dolibarr dolibarr_7.0.0 /usr/share$ sudo mv dolibarr dolibarr-8.0.2 /usr/share$ sudo tar -xzf ~/Downloads/dolibarr-8.0.2.tgz /usr/share$ sudo mv dolibarr-8.0.2 dolibarr /usr/share$ sudo chmod -R 755 /usr/share/dolibarr /usr/share$ sudo chown -R www-data.www-data /usr/share/dolibarr /usr/share$

I opened a browser on dolibarr and got a white ‘install or upgrade’ / dolibarr logo / version 8.0.2
I pressed ‘Next step’.
Now I am faced with a ‘Fresh Install’ start button but all the upgrades are ‘Not available’. :ohmy:

What do I do?? Help !!
Thanks in advance - Rich

Hey, did you backup the database beforehand?

1 Like

Thx for relpy… I have backup up the database through doli in a browser before I started, so I have a file like this…

mysqldump_dolibarrdebian_7.0.0_201809281554.sql.gz

I also back up /var/lib/dolibarr/documents (excluding a massive dolibarr.log file) which I also have, but don’t know how to get that back in without making things worse !

In that case I would move forward and install/upgrade. You can always import the database back into Dolibarr if things go wrong.

Also, you can delete that dolibarr.log file if you’re not referring to it, it will be re-created. Always handy after an upgrade.

After the next couple of browser pages it shows…

SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (1, ‘25040’, ‘PETIT APPAREILS MENAGERS’, 0.25000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (2, ‘25050’, ‘TRES PETIT APPAREILS MENAGERS’, 0.08000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (3, ‘32070’, ‘ECRAN POIDS < 5 KG’, 2.08000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (4, ‘32080’, ‘ECRAN POIDS > 5 KG’, 1.25000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (5, ‘32051’, ‘ORDINATEUR PORTABLE’, 0.42000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (6, ‘32061’, ‘TABLETTE INFORMATIQUE’, 0.84000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (7, ‘36011’, ‘ORDINATEUR FIXE (UC)’, 1.15000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (8, ‘36021’, ‘IMPRIMANTES’, 0.83000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (9, ‘36030’, ‘IT (INFORMATIQUE ET TELECOMS)’, 0.83000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (10, ‘36040’, ‘PETIT IT (CLAVIERS / SOURIS)’, 0.08000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (11, ‘36050’, ‘TELEPHONIE MOBILE’, 0.02000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (12, ‘36060’, ‘CONNECTIQUE CABLES’, 0.02000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (13, ‘45010’, ‘GROS MATERIEL GRAND PUBLIC (TELEAGRANDISSEURS)’, 1.67000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (14, ‘45020’, ‘MOYEN MATERIEL GRAND PUBLIC (LOUPES ELECTRONIQUES)’, 0.42000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (15, ‘45030’, ‘PETIT MATERIEL GRAND PUBLIC (VIE QUOTIDIENNE)’, 0.08000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (16, ‘75030’, ‘JOUETS < 0,5 KG’, 0.08000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (17, ‘75040’, ‘JOUETS ENTRE 0,5 KG ET 10 KG’, 0.17000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (18, ‘74050’, ‘JOUETS > 10 KG’, 1.67000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
SQL Error : DB_ERROR_NOSUCHFIELD - INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (19, ‘85010’, ‘EQUIPEMENT MEDICAL < 0,5 KG’, 0.08000000, ‘Eco-systèmes’, 1, 1); - Unknown column ‘label’ in ‘field list’
`

Below that, on the same page I have this…

Server connection : localhost Ok
Database version 5.7.20-ndb-7.6.4
Database name dolibarrdebian
Tables and Primary keys creation Ok
Create foreign keys and indexes for table llx_product.key
Request 682 : ALTER TABLE llx_product ADD CONSTRAINT fk_product_default_warehouse FOREIGN KEY (fk_default_warehouse) REFERENCES llx_entrepot (rowid) SQL Error DB_ERROR_1072 Key column ‘fk_default_warehouse’ doesn’t exist in table
Create foreign keys and indexes for table llx_societe_remise_except.key
Request 781 : ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_discount_type (discount_type) SQL Error DB_ERROR_1072 Key column ‘discount_type’ doesn’t exist in table
Create foreign keys and indexes for table llx_ticket.key
Request 803 : ALTER TABLE llx_ticket ADD UNIQUE uk_ticket_track_id (track_id) SQL Error DB_ERROR_1072 Key column ‘track_id’ doesn’t exist in table
Create foreign keys and indexes for table llx_ticket_logs.key
Request 804 : ALTER TABLE llx_ticket_logs ADD CONSTRAINT fk_ticket_logs_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticket (track_id) SQL Error DB_ERROR_CANNOT_ADD_FOREIGN_KEY_CONSTRAINT Cannot add foreign key constraint
Create foreign keys and indexes for table llx_ticket_msg.key
Request 805 : ALTER TABLE llx_ticket_msg ADD CONSTRAINT fk_ticket_msg_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticket (track_id) SQL Error DB_ERROR_CANNOT_ADD_FOREIGN_KEY_CONSTRAINT Cannot add foreign key constraint
Functions creation Ok
Reference data loading Error

I still have a ‘Next step’ button I can press - not sure what to do ?

Plenty of database errors it seems… (as long as you have the backup database) I would continue and run it through.

Remember, you can run the installer more than once, even if you successfully upgraded.

FEEDBACK-RECAP… It Worked ! Phew ! :happy:

I completed the process (what was basically a fresh install with existing data somehow involved/in the way). Then the chance offered to re-do install/upgrade without leaving browser. I did that and landed back at the first white fresh install screen but also offering various upgrades. Upgrade 7.0.*->8.0.* worked. One problem was some SQL error messages involving table llx_ticket, but I took ignore / continue route. Looking in MySQL-Workbench I see it’s a ticket system we no longer use. So for me no problem.

So far it all looks good.

I don’t know if I took the best route - or if there’s a more comfortable way? but hope this post helps others.

Thanks to Aaljawaid

Hey RichE, glad it worked for you. It can be daunting when things go wrong I know.

llx_ticket is just a table for the ticket module, which as it seems, is going through a major makeover for v9. I wouldn’t worry about it if you dont use it.

I think you took the best route. Just make sure your backups are done regularly and always keep a manual backup before upgrading.