Post by drrevans » Wed Dec 29, 2021 2:10 am

I have upgraded my opencart to 2.3 on my localhost eventually trying to get to 3x. I backed up mySQL database because I want to keep my data. I have the database created and the tables created in the upgraded databases. When I go to insert the category table, it has auto increment so it won't let me insert that value. I can't let it auto create that value because there is sure to be foreign keys of these values is other tables. If I were using SQL Server, I would just turn Identity on. How do you do this in mySQL?
Last edited by drrevans on Wed Dec 29, 2021 7:34 pm, edited 1 time in total.

New member

Posts

Joined
Mon Nov 29, 2021 1:31 am

Post by straightlight » Wed Dec 29, 2021 2:45 am

drrevans wrote:
Wed Dec 29, 2021 2:10 am
I have upgraded my opencart to 2.3 on my localhost eventually trying to get to 3x. I backed up mySQL database because I want to keep my data. I have the database created and the tables created in the upgraded databases. When I go to insert the category table, it has auto increment so it won't let me insert that value. I can't let it auto create that value because there is sure to be foreign keys of these values is other tables. If I were using SQL Server, I would just turn Identity on. How do you do this in mySQL?
If not using a shared and limited hosting plan for exporting the data, use PHPMyAdmin > Export > custom option rather than the default options in the export form.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by drrevans » Wed Dec 29, 2021 7:31 pm

straightlight wrote:
Wed Dec 29, 2021 2:45 am
If not using a shared and limited hosting plan for exporting the data, use PHPMyAdmin > Export > custom option rather than the default options in the export form.
I was able to use the hostsing plan to export the data. It creates the tables with the auto incrementing and after the data is inserted, it goes back and alter tables to make the keys auto incremented.

New member

Posts

Joined
Mon Nov 29, 2021 1:31 am
Who is online

Users browsing this forum: No registered users and 6 guests