l3msip Posted March 29, 2017 Share Posted March 29, 2017 Hello, i have a question about development workflow. I have some extensive modifications to do on an existing active shop, so have created a local filesytem copy, dumped the database, performed a find and replace in the dump for 'domain.com' to 'domain.dev', and changed the config to point the local copy to the new dev database. All good so far, i can make changes on the local copy without effecting the live site. The problem arises when i want to merge my dev site with the live one. Changes to the filesystem are easy enough to handle - track in git and simply upload and overwrite. However a lot of changes modify the database, primarily: Installing and configuring a blog 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 process of editing the dev copy, the live site has received a number of new orders and customers, so now the databases are out of sync, and i dont know how to proceed. I imaging this must be an issue for pretty much any active prestashop install that requires non trivial modification, but i cant find any resources that help with this. How are other developers handling this? Any help very much appreciated. Link to comment Share on other sites More sharing options...
bellini13 Posted March 29, 2017 Share Posted March 29, 2017 While its not ideal, you really just need to keep track of the changes you make (document them), this way for the things you cannot automate, you at least have repeatable steps to update your live site with the same changes you made to the test site. 1 Link to comment Share on other sites More sharing options...
l3msip Posted March 29, 2017 Author Share Posted March 29, 2017 While its not ideal, you really just need to keep track of the changes you make (document them), this way for the things you cannot automate, you at least have repeatable steps to update your live site with the same changes you made to the test site. Thanks @bellini13 Whilst thats certainly not what i wanted to hear (i have already done 90% of the work) at least i know im not missing an obvious trick. Its also going to involve having the live site in maintenance mode for an extended period of time which will come with a additional business cost (and also mean me working at 3am or whatever horrible time analytics suggests is the least costly to close the store). I think i will also reduce database usage as much as possible - hardcode custom pages instead of use the cms etc. What a pain. Link to comment Share on other sites More sharing options...
TurkeyFish Posted July 23, 2017 Share Posted July 23, 2017 (edited) I'd like to do this same thing. I'm configuring a new theme, which involves many modules, image settings, etc. It seems like what we need is a list of database tables that are regularly updated with customer and order info, so that we can back those tables up on the live site and restore them after copying the dev site over. There will be some extra modules with customer related db tables too. I should be able to go through and find those. But it would be nice to have a starting point of all tables in a default installation that contain all customer and order related data that we need to save. I can browse through phpmyadmin and eventually maybe figure it out, but I'm not intimately familiar with PS's tables and am likely to miss something. Edited July 23, 2017 by TurkeyFish (see edit history) Link to comment Share on other sites More sharing options...
skodik Posted April 7, 2019 Share Posted April 7, 2019 Still nobody solve this? There would be really super cool if anybody make a script for that, easy php which can update DB or even copy with PHP folders (in case it's on same server). Link to comment Share on other sites More sharing options...
HaCos Posted June 13, 2019 Share Posted June 13, 2019 Hi @skodik, I have been using git to track code changes, then push to staging & then to production. The problem with such a workflow occurs when a new module is installed on development env that does db changes eg new table installation. When we pushed changes to production we had to reinstall the module. Same problems should show up with wordpress enviroments & workflow i guess. Link to comment Share on other sites More sharing options...
orotoi Posted February 19, 2023 Share Posted February 19, 2023 (edited) Hi.. (second old topic bump i make today.. and sorry.. but seems that a lot of ppl are actually still searching for that) The thing is that not only a new module install make changes to DB. A lot of stuff about positions/hooks and content is stored in database. Is there something like git but for databases? --edit Ok, and as I submited prev post.. I just searched.. and there are some Git-like for DB's.. like Dolt and LiquidBase.. Edited February 19, 2023 by orotoi (see edit history) Link to comment Share on other sites More sharing options...
HaCos Posted February 19, 2023 Share Posted February 19, 2023 9 hours ago, orotoi said: Hi.. (second old topic bump i make today.. and sorry.. but seems that a lot of ppl are actually still searching for that) The thing is that not only a new module install make changes to DB. A lot of stuff about positions/hooks and content is stored in database. Is there something like git but for databases? --edit Ok, and as I submited prev post.. I just searched.. and there are some Git-like for DB's.. like Dolt and LiquidBase.. For the reason you mention its impossible to keep track of your code separately from DB. The workflow i am following today is - Create a copy of production instance as a staging. - Apply any changes (modules updates, code changes, core update tec) on staging & do tests. As long as changes are legit => - Either push changes from staging to production (this includes database overides) OR in case there have been new entries (new customers, new orders) in production since the creation of the staging, in order to avoid loosing them by overide - Rapply manually all changes i did on staging on production. Based on my experience its the most safe and easy to go workflow. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now