Updating and moving to a new server

Luckily you’re doing everything on your local / test environment.

MySQL said:
#1060 - Duplicate column name ‘item_product_id

First instinct would be:

  • drop the column so it can be re-added
    (^^ don’t do that)

If you check your … what is it … ip_invoice_items table it’s probably filled with lots of invoice_items

So … the .sql file is wrong.
And it’s probably in ip_versions, but still gets executed.
That’s weird, but ok.

Move that file to somewhere temporary.
You don’t know if the rest either did or did not get executed.

any fresh 1.6.2 can be done by just downloading the .zip and installating it.
That will give you the fresh database.

Unknown column ‘ip_client_custom.client_custom_fieldid

Just add that column.
Find out in which .sql file it got added and write that down.

Now you’re stuck between update 19 and update 38.

Still, i would compare the broken 1.6.2 structure and the fresh 1.6.2 structure (export from phpmyadmin)

Then you’ll probably find out what’s missing as well

I’m kind of broken here. I just don’t know enough to understand the instructions. I almost broke our live site cause of interruptions.

I appreciate your help so much but I think you might assume I know more than I do. The help has been exceptional. So much appreciation for taking the time UnderDog.

copy/paste the instructions that you didn’t understand.

The problem is that client_custom_fieldid is missing, it’s not added to the database.

That means you’ll have to find how it was added.
Most likely it’s here:
https://github.com/InvoicePlane/InvoicePlane/application/modules/setup/models/Mdl_setup.php#L273

But that also means that after a file in /application/modules/setup runs, something can still occur inside the application.

That happens in that link i gave you.

Long story short:
Better stick to going to /setup with your setting for DISABLE_SETUP=true
and
SETUP_COMPLETED=true

It should detect: héy, i’m at a really old version, let’s update.
If it finds that column that’s already there, find a way to not execute that file.