Noob Q: Is the PG database its own source code backup?
I find myself hacking away in pgAdmin most of the time now, after early
on keeping PG source code in text files I could preserve in SVN. At this
point I cannot point to anything other than the pg db itself that has a
full description.
Is this normal? Or do folks assiduously maintain an external set of
scripts and always work from those, resisting the temptation to just
hack at the db with pgAdmin or psql? Or_______?
kt
In response to Kenneth Tilton <kentilton@gmail.com>:
I find myself hacking away in pgAdmin most of the time now, after early
on keeping PG source code in text files I could preserve in SVN. At this
point I cannot point to anything other than the pg db itself that has a
full description.Is this normal? Or do folks assiduously maintain an external set of
scripts and always work from those, resisting the temptation to just
hack at the db with pgAdmin or psql? Or_______?
That depends heavily on how you work and what your needs are.
Personally, I recommend still keeping things in SVN because:
a) provides some sense of backup
b) maintains history of all your work
c) allows multiple developers to work together more easily
However, if you have other ways to solve those problems, or if
they're not important to you, you may not need SVN.
--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
2009/4/28 Kenneth Tilton <kentilton@gmail.com>:
I find myself hacking away in pgAdmin most of the time now, after early on
keeping PG source code in text files I could preserve in SVN. At this point
I cannot point to anything other than the pg db itself that has a full
description.Is this normal? Or do folks assiduously maintain an external set of scripts
and always work from those, resisting the temptation to just hack at the db
with pgAdmin or psql? Or_______?
By "source code" you mean the definitions of database objects (tables,
views, functions etc.?)
Usually with the projects I work with, I treat these as an integral
part of the application code and is maintained as a matter of course
in the source repository. I usually maintain a master file (or set of
files) containing the object definitions, a file (or script) to create
an initial application database setup from these; and a file which
contains the SQL required to make the changes between application
releases.
Ian Barwick