use strict;
use warnings;
our ( $DEBUG, $WARN );
-our $VERSION = '1.59';
+our $VERSION = '1.60';
$DEBUG = 0 unless defined $DEBUG;
use base qw(SQL::Translator::Producer);
$data_type = 'character varying';
}
elsif ( $field->is_auto_increment ) {
- if ( defined $size[0] && $size[0] > 11 ) {
+ if ( (defined $size[0] && $size[0] > 11) or $data_type eq 'bigint' ) {
$data_type = 'bigserial';
}
else {
# ALTER TABLE users ALTER COLUMN column SET DEFAULT ThisIsUnescaped;
if(ref $default_value eq "SCALAR" ) {
$default_value = $$default_value;
- } elsif( defined $default_value && $to_dt =~ /^(character|text)/xsmi ) {
+ } elsif( defined $default_value && $to_dt =~ /^(character|text|timestamp|date)/xsmi ) {
$default_value = __PACKAGE__->_quote_string($default_value);
}