Database error after upgrade to 1.4.7

A Database Error Occurred
Error Number: 1060

Duplicate column name 'item_product_id'

# IP-408 - Add reference to products to items ALTER TABLE `ip_invoice_items` ADD COLUMN `item_product_id` INT(11) DEFAULT NULL AFTER `item_tax_rate_id`;

Filename: /home/artxcent/public_html/igr/modules/setup/models/mdl_setup.php

Line Number: 94

A Database Error Occurred
Error Number: 1054

Unknown column 'provider_name' in 'field list'

INSERT INTO `ip_products` (`family_id`, `product_sku`, `product_name`, `product_description`, `product_price`, `tax_rate_id`, `provider_name`, `purchase_price`) VALUES ('1', '1', 'Fustan', 'Fustana te gjate', '29.90', NULL, '', NULL)

Filename: /home/artxcent/public_html/igr/core/MY_Model.php

Line Number: 207

These errors should not pop up if you have run the upgrade on a clean 1.4.6 database.
It looks like some database upgrade weren’t successful.

Please try to run the upgrades again with a backup of your database.


Additionally: please format your post properly. Use backticks ``` to format code and error messages.

Hi there,

I’m not sure but maybe your upgrade sql procedures for tables do not look if exist any column and it add double columns.

Thank you
Kovah

There are no checks needed as the upgrade scripts are created based on tables of the previous versions. I know which tables with which fields are available and upgrade them as needed.
If you have any problems with upgrades it means that you manually modified any tables in your database.

The line

ALTER TABLE `ip_invoice_items` ADD COLUMN `item_product_id` INT(11) DEFAULT NULL AFTER `item_tax_rate_id`;

mentioned in your error does not exist in the upgrade script for 1.4.7.

Please double check the version of your setup before the upgrade and which upgrades you applied before.

No I do not edit manual any table.

I just run twise the indes.php/setup for upgrade.

I have no data on this table, I’m going to delete and install a new copy direct form InvoicePlane 147

Thank you

1 Like

Plus one on this. I have the same issue and haven’t modified anything. The previous version was my first clean install. I have backed up my database and copied all files from the 1.4.7 apart from the /application/config/database.php config file.