Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Add dev data to production DB
Author « Topic »  

Andre
New Member

United Kingdom
96 Posts

Pre-sales questions only
(More Details...)

Posted - 11/01/2017 :  09:26:48  
Hello

I have two ECT websites: Production and Development, both at the same ECT version (6.7). I'm now ready to replace the production website with the one in development.

Replacing the PHP files is easy: it's the data I'm concerned about.

I've made extensive changes to some aspects of the development website data which I would like to transfer to the production DB. The easiest way to achieve this is to replace some of the production tables with the corresponding development tables (I've checked that foreign key relationships are maintained throughout).

My question is this: what is the best way (in PHPMyAdmin) to replace the production data with the development data, for a given table? Should I simply empty a production table and import data from the corresponding development table? Given that the new data may have extra rows, will mySql's Auto Increment feature (assuming ECT uses this) get confused?



André

Edited by - Andre on 11/01/2017 09:27:11

Andy
ECT Moderator

95440 Posts

Posted - 11/01/2017 :  09:52:25  
Hi André

Is it not possible to download the csv file from the dev site and import that to the production site?

Andy

Please feel free to review / rate our software

Andre
New Member

United Kingdom
96 Posts

Pre-sales questions only
(More Details...)

Posted - 11/01/2017 :  10:15:13  
Hi Andy

As far as I know the CSV file is only for Products. My changes affect the following tables:

contentregions
multisearchcriteria
multisections
searchcriteria
serachcriteriagroup
sections


André

Phil
ECT Moderator

United Kingdom
7715 Posts

Posted - 11/01/2017 :  11:30:41  
Hi André,

More information is required really, were the tables below copied over to your development site before you continued with development and then added further data to them?

contentregions
multisearchcriteria
multisections
searchcriteria
serachcriteriagroup
sections

Which way were you intending to import the table data? Development to production or production to development?




* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Edited by - Phil on 11/01/2017 11:33:05

Andre
New Member

United Kingdom
96 Posts

Pre-sales questions only
(More Details...)

Posted - 11/01/2017 :  12:21:36  
An exact copy of the production database formed the basis of the development database. In the tables mentioned, some rows were deleted, some were updated and some were added.

I'm intending to import these tables from development to production.

My question concerns the calculation of new ID's for new rows:

contentregions
When a new Content Region is added, how is the new contentId calculated? If I empty the contentregions table and then import a different set of rows having different contentId's, what happens when I create a new content region via the admin panel? Will it try to calculate the new contentId based on the old contents of that table or will it automatically adjust to the new data I've just imported?

multisearchcriteria
This table consists entirely of foreign keys, so the automatic calcuation of new IDs does not apply.

multisections
This table consists entirely of foreign keys, so the automatic calcuation of new IDs does not apply.

searchcriteria
Same issue as contentregions.

searchcriteriagroup
Same issue as contentregions.

sections
Same issue as contentregions.

André

Phil
ECT Moderator

United Kingdom
7715 Posts

Posted - 11/02/2017 :  03:52:17  
Hi André,

Keep backups of both databases and do the following:

from your dev database export as an sql file with the drop table statement the following tables:
contentregions
multisearchcriteria
multisections
searchcriteria
serachcriteriagroup
sections

Then just import them to your production database. One question, if you made changes to the sections will the products table data be effected based on the fact that the categories have changed?



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Andre
New Member

United Kingdom
96 Posts

Pre-sales questions only
(More Details...)

Posted - 11/02/2017 :  04:18:48  
Hi Phil

Many thanks for the advice.

Regarding Product Sections: yes, they will be affected but I'll make the necessary corrections after importing the data. Thanks for the reminder.

Regards

André
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000