phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

How are DB changes updated after I fetch new commits

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.

How are DB changes updated after I fetch new commits

Postby Senky » Wed Aug 29, 2012 5:57 pm

Hi,
while thinking of process how could I manage another quite big project through the github, I realised I would like to create commits from live working localhost. It is not a problem to generate proper .gitignore not to include unwanted files in commits, however I realised sometimes also DB is updated.

As I try to use similar development process as phpBB uses, I started to think of this problem also with phpBB project.

Until now, I had not pushed any PR including DB changes, but I always developed them in this way: I have phpbb3/ directory on my localhost. It includes phpbb/phpbb repo. While developing for develop branch, I use config.php that connects to proper DB, and while developing for develop-olympus, it uses another config.php. I rename install/ directory so that I can use board, and before creating new commit, I rename it back to install/ so that it makes no harm.

With this proces, however, it is not possible to update DB if I download new commits my local repo is behind, or am I wrong?

How do you manage this? I did not meet with any complication, yet, however I cannot imagine how could I update my DB if needed. Is the reinstallation of board the only way?

Thanks for any reply!
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm

Re: How are DB changes updated after I fetch new commits

Postby callumacrae » Wed Aug 29, 2012 6:07 pm

When `DEBUG` (or possibly `DEBUG_EXTRA`, I dunno the difference) is set to true, the install directory is allowed to remain.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 881
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: How are DB changes updated after I fetch new commits

Postby Senky » Wed Aug 29, 2012 6:54 pm

Wow it works! :) I did not know that, thanks!

Anyway, can anyone explain me that question related to DB updates when maintaining local board from git remote repo?
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm

Re: How are DB changes updated after I fetch new commits

Postby naderman » Thu Aug 30, 2012 10:15 am

Can you explain what that question actually was?
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: How are DB changes updated after I fetch new commits

Postby Senky » Thu Aug 30, 2012 12:18 pm

Well. I am developing on local board which is acually working normally. Time to time, I download and merge all commits my local board is behind of remote repo (https://github.com/phpbb/phpbb3) to be up-to-date and not push some patches with outdated code.
However, sometimes new commits change structure of DB (new tables are added, etc.) and all changes to DB are written in the installation script. It is fine, however my local board is running already and I do not reinstall it every time I merge it with the upstream. This means, my DB structure may be outdated sometimes. And now the question: how phpBB deals with it? Am I to reinstall my local development board every time DB structure changes?
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm

Re: How are DB changes updated after I fetch new commits

Postby nickvergessen » Thu Aug 30, 2012 6:56 pm

you can just call install/database_update.php everytime you fetch new commits. Devs try to keep the file in a state, where you can run it as often as you like
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: How are DB changes updated after I fetch new commits

Postby Senky » Thu Aug 30, 2012 6:59 pm

Ah, okay, thanks for explanation!
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm


Return to General Development Discussion

Who is online

Users browsing this forum: No registered users and 4 guests