$self->preserve_case(0);
}
elsif ($self->preserve_case) {
- $self->schema->storage->quote_char('"');
- $self->schema->storage->name_sep('.');
+ $self->schema->storage->sql_maker->quote_char('"');
+ $self->schema->storage->sql_maker->name_sep('.');
}
}
$sth->execute($self->_uc($table),$self->{db_schema} );
my %constr_names;
while(my $constr = $sth->fetchrow_arrayref) {
- my $constr_name = $constr->[0];
+ my $constr_name = $self->_lc($constr->[0]);
my $constr_col = $self->_lc($constr->[1]);
$constr_name =~ s/\Q$self->{_quoter}\E//;
$constr_col =~ s/\Q$self->{_quoter}\E//;
$info->{size} = $info->{size} / 2;
}
elsif (lc($info->{data_type}) eq 'number') {
- $info->{data_type} = 'numeric';
+ $info->{original}{data_type} = 'number';
+ $info->{data_type} = 'numeric';
if (eval { $info->{size}[0] == 38 && $info->{size}[1] == 0 }) {
+ $info->{original}{size} = $info->{size};
+
$info->{data_type} = 'integer';
delete $info->{size};
}
$info->{size} = [ $day_precision, $second_precision ];
}
}
+ elsif (lc($info->{data_type}) eq 'float') {
+ $info->{original}{data_type} = 'float';
+ $info->{original}{size} = $info->{size};
+
+ if ($info->{size} <= 63) {
+ $info->{data_type} = 'real';
+ }
+ else {
+ $info->{data_type} = 'double precision';
+ }
+ delete $info->{size};
+ }
elsif (lc($info->{data_type}) eq 'urowid' && $info->{size} == 4000) {
delete $info->{size};
}
$info->{data_type} = 'datetime';
$info->{original}{data_type} = 'date';
}
-
- if (eval { lc(${ $info->{default_value} }) eq 'sysdate' }) {
- $info->{original}{default_value} = $info->{default_value};
-
+ elsif (lc($info->{data_type}) eq 'binary_float') {
+ $info->{data_type} = 'real';
+ $info->{original}{data_type} = 'binary_float';
+ }
+ elsif (lc($info->{data_type}) eq 'binary_double') {
+ $info->{data_type} = 'double precision';
+ $info->{original}{data_type} = 'binary_double';
+ }
+
+ if ((eval { lc(${ $info->{default_value} }) }||'') eq 'sysdate') {
my $current_timestamp = 'current_timestamp';
$info->{default_value} = \$current_timestamp;
+
+ my $sysdate = 'sysdate';
+ $info->{original}{default_value} = \$sysdate;
}
}