if ( $driver eq 'mysql' ) { #yucky mysql hack
$null ||= "NOT NULL";
$self->local('AUTO_INCREMENT') if uc($self->type) eq 'SERIAL';
- } elsif ( $driver =~ /^(?:Pg|SQLite)$/ ) { #yucky Pg hack
+ } elsif ( $driver =~ /^(?:Pg|SQLite)$/ ) { #yucky Pg/SQLite hack
$null ||= "NOT NULL";
$null =~ s/^NULL$//;
}
my @columns = map { $self->column($_)->line($dbh) } $self->columns;
push @columns, "PRIMARY KEY (". $self->primary_key. ")"
- #if $self->primary_key && $driver ne 'Pg';
- # SQLite needs to declare its autoincrementing columns as PRIMARY KEYS inline
- # otherwise they have no magic
- if ($self->primary_key and not ( grep { /PRIMARY KEY/ } @columns));
+ if $self->primary_key && ! grep /PRIMARY KEY/i, @columns;
my $indexnum = 1;