Post by snappyfish » Sun Jul 24, 2011 3:45 am

Hi, Trying to upgrade to 1.5.1.1 from 1.5.1 So I take a copy of my database from 1.5.1 phpMyAdmin from my live server. I Install 1.5.1.1 locally and go to phpMyAdmin and "emtpy" all the table and try to import the old Database and import gives this error

#1054 - Unknown column 'invoice_date' in 'field list'

Any ideas?

Thanks.

Active Member

Posts

Joined
Thu Apr 14, 2011 4:36 am

Post by RogerD9 » Mon Jul 25, 2011 8:47 pm

I tried that myself and got the same error on a lower version of OpenCart. I then upgraded using the upgrade.php file that comes with each version of OpenCart and it successfully upgraded the database. Each version of OpenCart has a different database structure. New fields are added and others are deleted with each new version. PhpMyAdmin does not change the structure of the database so in effect your are trying to import your old data structures into the new structures. For you the invoice_date column was either deleted or renamed under the new upgraded database structure. Hence the error.

The upgrade.php script takes your old database and makes a copy of it. It then ads the new fields in the copy deletes any old fields and then merges your data into the new structure.

So use the upgrade.php when you upgrade. It's safer and works 9 times out of 10. That's as long as there are no scripting errors in the upgrade package.

Newbie

Posts

Joined
Sat Jul 23, 2011 5:49 pm
Location - Kingston, Ontario, Canada

Post by snappyfish » Tue Jul 26, 2011 6:41 pm

RogerD9 wrote:I tried that myself and got the same error on a lower version of OpenCart. I then upgraded using the upgrade.php file that comes with each version of OpenCart and it successfully upgraded the database. Each version of OpenCart has a different database structure. New fields are added and others are deleted with each new version. PhpMyAdmin does not change the structure of the database so in effect your are trying to import your old data structures into the new structures. For you the invoice_date column was either deleted or renamed under the new upgraded database structure. Hence the error.

The upgrade.php script takes your old database and makes a copy of it. It then ads the new fields in the copy deletes any old fields and then merges your data into the new structure.

So use the upgrade.php when you upgrade. It's safer and works 9 times out of 10. That's as long as there are no scripting errors in the upgrade package.
Hi, Thanks for reply. I didn't think there was any db changes from 1.5.1 to 1.5.1.1 It must have gone wrong from a previous upgrade? But anyway I managed to fix it.

Thanks.

Active Member

Posts

Joined
Thu Apr 14, 2011 4:36 am
Who is online

Users browsing this forum: No registered users and 21 guests