[Dbix-class] DBIx::Class::Schema::Loader with multiple schemas

Alejandro Imass aimass at yabarana.com
Wed Dec 19 21:22:40 GMT 2012


On Wed, Dec 19, 2012 at 3:06 PM, Nick Anderson <nick at webcraftcs.com> wrote:
>
> Hi,
>
> I am trying to use DBIx::Class::Schema::Loader to create a schema for two
> inter-related databases but am having trouble where it insists on prefixing
> with the database name:
>
> __PACKAGE__->table(db_prefix.table_name);
>
>
> With one database, it doesn't include the prefix.
>
> With two it includes it even where there are no conflicting table names.
>
>

Going out on a limb here but instead of moniker_parts have you looked
at using the db_schema option? it should load tables owned by that
user (or in that schema in Pg's case) without prefix and only add the
prefix on conflicting ones. I use Pg schemas and works well for me.

BTW you did not mention your RDBMS.

Best,

-- 
Alejandro Imass



More information about the DBIx-Class mailing list