From: "Bernhard Graf" <[EMAIL PROTECTED]>
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

Aha, so actually you are saying that the DBIC::Schema Catalyst helper doesn't create a complete and valid schema, and I must edit it manually.

But if I'll edit it manually, I would break the checksum.

I must say that I don't understand what is that checksum used for if the recommended way is to use the Catalyst helper only once for creating the DBIC schema, then alter the database from it.

Do I understand correctly that:

1. That checksum is useful for those who don't need to use special components or settings in the class file and want to make changes in the database then update the DBIC classes from the database using the Catalyst helper.

2. That checksum has no value for those who need to use some components and configuration that can't be done by the Catalyst helper, and they should use the Catalyst helper only once (if they want) for creating the DBIC classes, then they can make any changes they want in them, without needing to put those changes below the checksum only, and without needing to use a BEGIN {} block. So they can make the necessary correction after creating the DBIC classes, and then alter the database from those classes.

I was confused by the thing that a year or so ago there was no checksum defined in the DBIC classes, but that constraint appeared recently, so I thought that using the Catalyst helper for updating the DBIC classes was the recommended way.

Thank you.

Octavian


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to