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

Nick Anderson nick at webcraftcs.com
Wed Dec 19 21:51:18 GMT 2012


Thanks for that.

I am using db_schema:

db_schema => ['A','B']

but it still adds the prefixes for both DBs even for the DB specified in 
the connection info.

I'm using MySQL


Nick

On 19/12/12 21:22, Alejandro Imass wrote:
> 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,
>




More information about the DBIx-Class mailing list