Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 84238
Status: rejected
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: JETEVE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.07025
Fixed in: 0.07035



Subject: Loader db_schema options doesn't work with Postgres (and probably others)
I've got two schemas in my Pg DB: 'public' and 'tb_meta' . When I pass db_schema => [ 'public' , 'tb_meta' ] in the options of 'make_schema_at' , NO ResultSets are generated. When I don't use any db_schema option, only the resultsets from 'public' are built, which is normal. The interesting thing is when I just use db_schema => [ 'public' ] , it doesn't work neither. This probably points to a defect in the framework itself rather than in the Pg specific loader. NOTE: I'm not after full qualification of table names, as I set my search_path correctly at runtime. Is there a quick workaround? Thanks for your support.
On Wed Mar 27 07:10:03 2013, JETEVE wrote: Show quoted text
> I've got two schemas in my Pg DB: 'public' and 'tb_meta' . > > When I pass db_schema => [ 'public' , 'tb_meta' ] in the options of > 'make_schema_at' , NO ResultSets are generated.
Can you provide the exact make_schema_at invocation you're using, please?
On Wed Mar 27 12:39:29 2013, GENEHACK wrote: Show quoted text
> > When I pass db_schema => [ 'public' , 'tb_meta' ] in the options of > > 'make_schema_at' , NO ResultSets are generated.
> > Can you provide the exact make_schema_at invocation you're using, please?
Sure, it's a pretty straight forward one. The dsn is a Postgres dsn. I tried the on_connect_do setting of the search_path, but it doesn't help. As far as I could see in the Pg Loader, this is normal. DBIx::Class::Schema::Loader::make_schema_at( __PACKAGE__.'::DB', { debug => 0, dump_directory => $dump_dir, components => ["InflateColumn::DateTime"], ## db_schema => [ 'public', 'tb_meta' ] ## DOES NOT WORK :( }, [ $db_conf->{dsn}, $db_conf->{username}, $db_conf->{password} , { #on_connect_do => #[ 'SET search_path = public,tb_meta' ] } ] );
I had a look at the code, and the V 0.07010 doesn't include any multi schema test. Will upgrade to the latest one. On Wed Mar 27 13:12:05 2013, JETEVE wrote: Show quoted text
> On Wed Mar 27 12:39:29 2013, GENEHACK wrote:
> > > When I pass db_schema => [ 'public' , 'tb_meta' ] in the options
> of
> > > 'make_schema_at' , NO ResultSets are generated.
> > > > Can you provide the exact make_schema_at invocation you're using,
> please? > > > Sure, it's a pretty straight forward one. The dsn is a Postgres dsn. > > I tried the on_connect_do setting of the search_path, but it doesn't > help. As far as I could see in the Pg Loader, this is normal. > > > DBIx::Class::Schema::Loader::make_schema_at( __PACKAGE__.'::DB', > { > debug => 0, > dump_directory => > $dump_dir, > components => > ["InflateColumn::DateTime"], > ## db_schema => [ > 'public', 'tb_meta' ] ## DOES NOT WORK :( > }, > [ $db_conf->{dsn}, > $db_conf->{username}, $db_conf->{password} > , { > #on_connect_do => > #[ 'SET > search_path = public,tb_meta' ] > } > ] > );
Works in latest version V 0.07035. Doc of affected version only mentions single schema.