On Fri, 27 May 2011 13:07:06 -0700
Chris Travers<..hidden..> wrote:
Currently there are two approaches to installing databases in Perl.
The first (initiate.pl) has officially been moved to add-ons and is a
web-based interface for this process. I have not personally used it,
although I have recently committed a lot of patches against it.
I'm not sure I like a web-based interface. This makes automated
installations and testing much harder.
The second approach is the use of makefile targets installdb and
installdb_interactive.
I don't like that approach either. I prefer an approach like this:
1) make
2) make install
3) ledgersmb-init-database
That is, have a dedicated command-line script that initializes the database.
It can be interactive, but should also take command-line options for a
fully-automated setup of the database. The ledgersmb-init-database
script should do sanity checks to see if there's already a database, etc.
If it does find a database, it can offer to do a schema upgrade (or
do it automatically if so told by a command-line option.)
This has the nice side-effect of making the upgrade procedure
absolutely identical to the initial-installation procedure: make;
make-install; ledgersmb-init-database.