Skip Menu |

This queue is for tickets about the Catalyst-Model-DBIC-Schema CPAN distribution.

Report information
The Basics
Id: 50930
Status: rejected
Priority: 0/
Queue: Catalyst-Model-DBIC-Schema

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

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



Subject: create script will error out if a table has no primary key
i understand a table without primary key might be a bad thing but i think the tool should just be able to handle it. right now, it will error out [root]# ./script/myapp_create.pl model DB DBIC::Schema MyApp::Schema create=static dbi:mysql:dbname:hostname=dbhost user pass exists "../lib/MyApp/Model" exists "../t" DBIx::Class::Schema::Loader::make_schema_at(): table_xyz has no primary key at /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 519 Dumping manual schema for MyApp::Schema to directory ../lib ... DBIx::Class::Schema::Loader::make_schema_at(): Cannot not overwrite '../lib/MyApp/Schema.pm' without 'really_erase_my_files', it does not appear to have been generated by Loader at /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 519 [root]#
Subject: Re: [rt.cpan.org #50930] create script will error out if a table has no primary key
Date: Fri, 30 Oct 2009 08:15:24 -0400
To: "http://somekool.myopenid.com/ via RT" <bug-Catalyst-Model-DBIC-Schema [...] rt.cpan.org>
From: Rafael Kitover <rkitover [...] io.com>
On Wed, Oct 28, 2009 at 03:45:26PM -0400, http://somekool.myopenid.com/ via RT wrote: Show quoted text
> i understand a table without primary key might be a bad thing > but i think the tool should just be able to handle it. > > right now, it will error out > > [root]# ./script/myapp_create.pl model DB DBIC::Schema MyApp::Schema > create=static dbi:mysql:dbname:hostname=dbhost user pass > exists "../lib/MyApp/Model" > exists "../t" > DBIx::Class::Schema::Loader::make_schema_at(): table_xyz has no primary > key at > /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 519
This is just a warning. Show quoted text
> Dumping manual schema for MyApp::Schema to directory ../lib ... > DBIx::Class::Schema::Loader::make_schema_at(): Cannot not overwrite > '../lib/MyApp/Schema.pm' without 'really_erase_my_files', it does not > appear to have been generated by Loader at > /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 519
This is your error. You made some modification to Schema.pm that it cannot overwrite. You must make these modifications below the md5 line.
Closing.