[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: State of Perl-based database setup utilities for LedgerSMB 1.3



On 27/05/2011 21:43, David F. Skoll wrote:
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.

Wouldn't Test::WWW::Mechanize make this pretty straight forward?

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.

I guess it depends on what you are used to. Some users will not be used to installing and making packages on the command line, so for them a web interface would likely be more intuitive.


Lyle