- || ( driver_name eq 'Pg' && $col->default =~ /^nextval\(/i )
- || ( driver_name eq 'mysql' && $col->local =~ /AUTO_INCREMENT/i );
+ || ( driver_name eq 'Pg'
+ && defined($col->default)
+ && $col->default =~ /^nextval\(/i
+ )
+ || ( driver_name eq 'mysql'
+ && defined($col->local)
+ && $col->local =~ /AUTO_INCREMENT/i
+ );