[prev] [thread] [next] [lurker] [Date index for 2004/10/15]
On Thu, Oct 14, 2004 at 10:07:38PM -0700, Bowen Dwelle said:
> I may well be mistaken, but offhand I don't see any easy way to add a
> prefix to Siesta's table names (i.e. siesta_*). Same thing for
> Email::Store. This is a pretty basic requirement for multiple apps to
> co-exist in a single database.
I think that's pretty difficult to do under Class::DBI - not impossible
though.
I think, and this is a completely untested 'think', you'd have to go
through every class that uses Siesta::DBI as a base and wherever it
mentions a table change that to "${prefix}table" then, in Siesta::DBI
init_db add a line that says
$statement =~ s/CREATE TABLE /CREATE TABLE ${prefix}/g;
or something. Either that or try and overload various methods in
Class::DBI to allow it. At that point it's starting getting to the point
where it'd be worth patching Class::DBI directly.
However, unless it's really urgent, I'd suggest just using seperate
databases.
Simon
There's stuff above here
Generated at 14:00 on 11 Nov 2004 by mariachi 0.52