Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merging dev and live prestashop databases

I have extensive modifications to carry out on a prestashop 1.6 site.

I have created a local copy, and am tracking filesystem changes in git.

However a lot of changes in prestashop are stored in the database, specifically in my case:

  • Installing and configuring a new module
  • Uninstalling a module
  • Adding shop categories and changing the hierarchy
  • Changing module positions
  • and generally modifying what modules appear in what hooks.

During the dev process, the live site has received numerous new orders, customers, subscribers etc, so the databases are out of sync.

I have solved similar problems in other frameworks by dumping and importing specific tables in the db, or using the frameworks built in migrations functionality, but i cannot find any advise specifically for prestashop.

How is this handled?

Considering that the dev site has probably undergone more diverse changes than the live one, i wonder if it would be easier to copy the new orders etc over to the dev site then overwrite the whole thing?

like image 865
Steve Avatar asked Mar 29 '17 10:03

Steve


2 Answers

I don't think that it is possible to achieve this in PrestaShop. You must have immense knowledge of PrestaShop DB (i.e. have knowledge of each and every table and columns in it) to merge the databases.

It is never recommended to do that either.

I suggest you do the syncing manually as it is a very risky task and you might lose all the data in your live store, which will be even more painful.

like image 93
Wolfack Avatar answered Nov 03 '22 11:11

Wolfack


For modules the information is stored in all tables which start with modules. Module config values are stored in configuration and configuration_lang. Make sure you also copy custom module tables of course.

Shop categories information is in all tables which start with category.

Module hooks information is in all tables which start with hook.

However as Raghubendra Singh said in his answer this is very risky task, if you really really want to do it, I suggest you create another local copy of currently live site and first try the process between two local copies and make sure everything works correctly.

like image 41
TheDrot Avatar answered Nov 03 '22 11:11

TheDrot