Using SVN with a MySQL database ran by xamp - yes or no? (and how?) -
for current php/mysql project (over group of 4 5 team members), using setup: each developer codes , test on localhost running xamp, , upload test server via svn.
one question have how synchronize mysql database? may have added new table project , php code references it, other team members need access table code (once got through svn) work.
we not working in same office time, having lan , mysql server in office not feasible. toying 2 solutions
setup test db online, , have coders reference that, when coding localhost. downside: can't test if happen not have internet access.
somehow sync localhost copy of mysql db. kind of silly? , if consider this, how do it? (which folder add svn?)
(i guess related question how automatically update live mysql db testing db, regardless if on remote server or hosted locally via xamp. advice regarding welcomed!)
it's reasonable maintain database schema in source control -- in fact, database-driven products that. have no idea how repository laid out, long don't have php code directly under root, you'll fine. if have php code under root, suggest svn mv
own directory.
storing data in source control little more problematic. if require data initialize database use, sure, makes sense. same test data. if you're trying store live data, not (that's why have database, after all). don't know how mysql manages database backups, i'm assuming there's more compact format long sql script (oracle, example, exp
format).
to give real-world example, here's approach taken product worked on.
- the ddl create current database schema under source-control, , part of release.
- the sql (dml) insert initial values database under source control.
- for every release, there script update database previous release. script altered / added tables, , inserted/deleted rows.
- test programs assumed "clean" database, , responsible inserting own data.
- as product, post-initialization data added customer.
i started working @ company when product 5 years old, , left 4 years later. never tried version 1 release, know version 2.x release upgraded way version 4.0 release (there typically dot-releases every 4 months).
Comments
Post a Comment