[Dbix-class] Database too big.

Peter Rabbitson rabbit+dbic at rabbit.us
Thu Apr 3 14:07:38 GMT 2014


On Thu, Apr 03, 2014 at 05:47:18AM -0700, Bill Moseley wrote:
> 
> One option is to hunt down every use of $schema for the subset of tables
> and replace it with $other_schema.

This is what I would recommend. Can you give ideas of the scale of 
changes required?
 
> But, is there anything I might do that is a bit more "clever"?:
> 
> $schema->resultset( 'Foo' )  # uses one database
> $schema->resultset( 'Bar' )  # uses a different connection

A schema object is by definition a "proxy that ties mutliple sources and 
a *single* storage object together". As such cleverness in this area is 
likely to bite you. I can not think of specifics at this moment, but the 
gut feeling is "don't do it".

Cheers




More information about the DBIx-Class mailing list