From: Mark Addison Date: Tue, 23 Mar 2004 21:12:22 +0000 (+0000) Subject: Removed check on field name when adding fields, as the fields constructor does it... X-Git-Tag: v0.06~122 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2304475892193ead45c2566f301c1b2a6874b9e1;p=dbsrgits%2FSQL-Translator.git Removed check on field name when adding fields, as the fields constructor does it now. --- diff --git a/lib/SQL/Translator/Schema.pm b/lib/SQL/Translator/Schema.pm index eb8e8c2..cea46ad 100644 --- a/lib/SQL/Translator/Schema.pm +++ b/lib/SQL/Translator/Schema.pm @@ -1,7 +1,7 @@ package SQL::Translator::Schema; # ---------------------------------------------------------------------- -# $Id: Schema.pm,v 1.13 2004-02-09 23:04:26 kycl4rk Exp $ +# $Id: Schema.pm,v 1.14 2004-03-23 21:12:22 grommit Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -54,7 +54,7 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'Class::Base'; use vars qw[ $VERSION $TABLE_ORDER $VIEW_ORDER $TRIGGER_ORDER $PROC_ORDER ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/; # ---------------------------------------------------------------------- sub init { @@ -111,7 +111,8 @@ not be created. } $table->order( ++$TABLE_ORDER ); - my $table_name = $table->name or return $self->error('No table name'); + # We know we have a name as the Table->new above errors if none given. + my $table_name = $table->name; if ( defined $self->{'tables'}{ $table_name } ) { return $self->error(qq[Can't create table: "$table_name" exists]);