A
|
Aleix 2/18/2010 |
Hi all, is there a best practice for testing apps locally vs. production with regard to the database? Do you use a single production database that is accessed remotely when testing changes locally (using WAMP or XAMPP for local PHP/Apache). Or do you keep a separate database (either remote or local) and switch to it when local testing? Maybe I missed it but I didn't see an easy way to change database connection information after a project was initially started. The first method is easy - having 1 database and just FTP-ing the PHP files to production when ready but I worry a little about doing development using the production database. I'm fine using single database if that's the norm but I just wanted check in and compare with what others who have more experience are doing.
|
S
|
Sandi Jerome 2/18/2010 |
I use Navicat and have one copy of the database on my localhost and another copy on the server with it's own Navicat connection. I am connected to localhost with PHPRunner. If I make changes to localhost, I use Navicat to drag the new tables/views to the server. |
![]() |
Admin 2/18/2010 |
The best approach is to develop/test everything locally. |
E
|
electromotive 2/18/2010 |
Surprises during production upgrades are very embarrassing and too many will lead to a "you're fired"!
|
A
|
Aleix 2/19/2010 |
Surprises during production upgrades are very embarrassing and too many will lead to a "you're fired"! Not sure if its best practice, but here's what I do to minimise surprises. There are 3-4 versions of the database.
|
E
|
electromotive 3/15/2010 |
Hi; Great your ideas! I am seeing the Navicat web and it looks fine (I do not try it) The idea with pre-released DB, It is very good, becouse you can test it in a very similar environment. I will do it. Mike if you want to connect to another DDBB you can do it with PHPRunner in the tables, Back button and then you can change the server or DDBB One question Electro Rick. Why do you have the same DB name in the 3 environments? We do: DBname_customerVersion_developVersion. In this way we can see easily which is the last development. Another question is; While we are doing the development, in the production DDBB the users have changed the data. We solve in this way: .1 production DDBB --> export data (with phpAdmin) .2 development DDBB <-- import data (with phpAdmin) .3 Test .4 development DDBB --> export data and estructure (Now with phpAdmin, and we will tray the tools you say) .5 production DDBB --> import data and estructure Do you have another way? Thanks
|