Error when i try to upgrade xibo from 1.6.3 to 1.7.4 [RESOLV]

Good morning everyone,
I have a problem when i try to upgrade my installation of Xibo 1.6.3 to 1.7.4.
My final objective is to upgrade up to 1.8.x but i must to pass to 1.7.x before.

So this is my error:
An error occurred running the upgrade. Please take a screen shot of this page and seek help. Statement number: 82. Error Message = [SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1’ for key ‘PRIMARY’]. File = [Array]. SQL = [INSERT INTO tag (tagId, tag) VALUES (1, ‘template’), (2, ‘background’), (3, ‘thumbnail’)].

Upgrading from database version 81 to 89

You need to roll back to your backup, and then upgrade to 1.7.9. There’s no need to upgrade to 1.7.4 first.

Ok i’m doing that and i come back to you,

So, i tried to upgrade from 1.6.3 to 1.7.9 as you said me, but i have had the same error…

Have you got other idea…
So, in waiting, i’m going to try to upgrade from 1.6.3 to the last one on 1.6 (1.6.4) and after 1.7.0 to 1.7.9 and finish 1.8.0.
Maybe it’s more long but more sure, non?

What do you think about?
Thanks a lot

You can certainly try that.

I’m surprised they came up with exactly the same error. You definitely restored your database backup? Once the upgrade process has started to run, you can’t then have an error part way through and then just try again. You must drop the database, and then restore your backup you took from before the upgrade.

I’m currently doing the update up to 1.7.0. So i’m waiting the end of process.
But i could tell you that i restored my database for my last mysqldump, but maybe it provide from my database.
I have a lot of media inside, maybe i could delete a good part of them before upgrading.

After i finish my process i wioll come back…

I continue my investigation about my problem and i found somme different things:

  • My stat table had got up to 20M of line :stuck_out_tongue: so i have clear out my stat table
    Another point is my media table

  • So i have 621 media inside and the weight is aroud 4GB

I’m trying to clear out this table but i have this error:

#1451 - Cannot delete or update a parent row: a foreign key constraint fails (obix.lklayoutmedia, CONSTRAINT lklayoutmedia_ibfk_1 FOREIGN KEY (mediaID) REFERENCES media (mediaID))

You can’t just delete stuff from the tables. There are all kinds of references kept. Directly editing the database will very definitely cause upgrade failures.

Ok, it’s resolved!!

In fact, i had the answer of my problem in first message but i don’t see it , i will need to buy some new eye!! :stuck_out_tongue:

Into the screen capture, it’s written INTO TAG so i’m seen in this table to find 2 lines.
First named “default” and the second "import"
I have just deleted this two entries and the upgrade is passed

In this table, now there are “template”, “background”, “thumbnail”

And all it’s work

1 Like