[Dbix-class] enum column values

Rob Kinyon rob.kinyon at gmail.com
Tue Mar 8 14:49:50 GMT 2011


On Tue, Mar 8, 2011 at 09:39, Dave Howorth <dhoworth at mrc-lmb.cam.ac.uk> wrote:
> Rob Kinyon wrote:
>> Have you tried just using the column without declaring the enum
>> values? The stuff in column_info isn't really used unless you're
>> creating the schema from DBIC. DBIC doesn't actually do any validation
>> of enum values (or anything else, for that matter) when you read from
>> or write to the database.
>
> I hadn't no; I foolishly assumed that all the data in add_columns was
> there for some purpose :)  But you're quite right, there seems to be no
> need to jump through the remove_column, add_column hoop.

All the data is there for a purpose. Most people just don't hit that
purpose in day-to-day operations. I, personally, never use the
deployment capabilities of DBIC.

> So I've just created a specific method to read the enum values from the
> database. That seems to work.

Why do you even need to know this list at all? Is this to present a
list to a user or something?

Rob



More information about the DBIx-Class mailing list