[Bast-commits] r8164 -
DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Thu Dec 24 09:13:37 GMT 2009
Author: ribasushi
Date: 2009-12-24 09:13:37 +0000 (Thu, 24 Dec 2009)
New Revision: 8164
Modified:
DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
Log:
Don't call the PK setter if no PK
Modified: DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-12-24 08:59:52 UTC (rev 8163)
+++ DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm 2009-12-24 09:13:37 UTC (rev 8164)
@@ -112,9 +112,11 @@
my $f = $table->add_field(%colinfo)
|| $dbicschema->throw_exception ($table->error);
}
- $table->primary_key($source->primary_columns);
my @primary = $source->primary_columns;
+
+ $table->primary_key(@primary) if @primary;
+
my %unique_constraints = $source->unique_constraints;
foreach my $uniq (sort keys %unique_constraints) {
if (!$source->_compare_relationship_keys($unique_constraints{$uniq}, \@primary)) {
More information about the Bast-commits
mailing list