[Dbix-class] Small fix for DBIx::Class::Schema::Loader::DBI::mysql
Nilson Santos Figueiredo Junior
acid06 at gmail.com
Wed Jul 19 07:55:25 CEST 2006
The attached patch fixes an issue where Schema::Loader would dump
useless unique constraints when loading from MySQL. The current
(unfixed) output looks like:
__PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint("name", ["name"]);
__PACKAGE__->add_unique_constraint(["name"], undef);
__PACKAGE__->add_unique_constraint(["id"], undef);
If you've got a primary key "id" and an additional unique constraint
"name", for example.
The correct output should be:
__PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint("name", ["name"]);
The patch is a one word fix. ;-)
-Nilson Santos F. Jr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mysql-fix.patch
Type: application/octet-stream
Size: 429 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060719/ff101bfc/attachment.obj
More information about the Dbix-class
mailing list