[Catalyst] Re: recommendation
Bernhard Graf
catalyst3 at augensalat.de
Sun Nov 16 09:51:56 GMT 2008
Octavian Rasnita wrote:
> > This approach *is* best practice and it *does* work fine for
> > SQLite, MySQL and Postgres at least.
So far I can confirm this at least for MySQL.
I had a short look on PostgreSQL and noticed that there is no support
for ENUMs, neither directly (AFAIK ENUM is quite new for Pg) nor by a
CHECK constraint on varchar. But since I don't use Pg I actually don't
care much.
> I've reported a very long time ago but nothing happend. But maybe I
> am doing something wrong.
> I remember the following types of errors (for MySQL 5):
>
> The date field used to get a field size which is not correct, like:
>
> mydate date(10)
Simply don't specify the size for date/datetime/tim fields.
Can be counted as a bug at least for MySQL and SQLite (Pg seems OK).
> and the enum() field doesn't remember the field elements.
> The field elements for enum field types are not saved in the DBIC
> class file when the classes are created using the Catalyst helper.
>
> So when the SQL string is re-created, it looks something like:
>
> members enum()
>
> which of course, gives an error when trying to update the database.
xyz => {
data_type => 'enum',
extra => {list => [qw(foo bar baz)]}
}
--
Bernhard Graf
More information about the Catalyst
mailing list