Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: dinisrebolo [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.07048



Subject: For DBI::Pg Enums types are not properly created when they exist in the same schema
Date: Tue, 10 Oct 2017 13:15:51 +0100
To: bug-DBIx-Class-Schema-Loader [...] rt.cpan.org
From: Dinis Rebolo <dinisrebolo [...] gmail.com>
When using enum types that exists in the same schema from where classes are being generated, enum types are not properly created. e.g. expecting something like: data_type: 'enum' extra: {custom_type_name => "my_custom_type",list => ["banana","orange","apple"]} getting: data_type: 'myschema.my_custome_type' -- Dinis Rebolo dinisrebolo@gmail.com
From: felix.ostmann [...] gmail.com
Am Di 10. Okt 2017, 08:16:34, dinisrebolo@gmail.com schrieb: Show quoted text
> When using enum types that exists in the same schema from where classes are > being generated, > enum types are not properly created. > > e.g. > > expecting something like: > > data_type: 'enum' > extra: {custom_type_name => "my_custom_type",list => > ["banana","orange","apple"]} > > getting: > > data_type: 'myschema.my_custome_type' > >
Works for me with the current version. Show quoted text
> \dT+
... steinhaus_main | enum_tasks_status | enum_tasks_status | 4 | offen +| | | | | erledigt +| | | | | zurückgestellt | ... $ grep status -C5 Tasks.pm ... "status", { data_type => "enum", default_value => "offen", extra => { custom_type_name => "enum_tasks_status", list => ["offen", "erledigt", "zur\xFCckgestellt"], }, is_nullable => 0, }, ... Did you use the db_schema option from DBIx::Class::Schema::Loader?
On 2017-11-21 09:48:28, felix.ostmann@gmail.com wrote: Show quoted text
> Am Di 10. Okt 2017, 08:16:34, dinisrebolo@gmail.com schrieb:
> > When using enum types that exists in the same schema from where > > classes are being generated, enum types are not properly created. > > > > e.g. > > > > expecting something like: > > > > data_type: 'enum' > > extra: {custom_type_name => "my_custom_type",list => > > ["banana","orange","apple"]} > > > > getting: > > > > data_type: 'myschema.my_custome_type' > > > >
> > Works for me with the current version. >
> > \dT+
> ... > steinhaus_main | enum_tasks_status | enum_tasks_status | 4 | > offen +| > | | | | > erledigt +| > | | | | > zurückgestellt | > ... > > > $ grep status -C5 Tasks.pm > ... > "status", > { > data_type => "enum", > default_value => "offen", > extra => { > custom_type_name => "enum_tasks_status", > list => ["offen", "erledigt", "zur\xFCckgestellt"], > }, > is_nullable => 0, > }, > ... > > > Did you use the db_schema option from DBIx::Class::Schema::Loader?
The issue occurs when db_schema is used to specify schemas not in the default search_path. This has been fixed in git (https://github.com/dbsrgits/dbix-class-schema-loader/commit/a07eab0a070a742540c0cf432c651c0be0a3b9e7) and will be in the next release. - ilmari
The fix has now been released in version 0.07048 - ilmari