X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FODBC%2FACCESS.pm;h=cfaa902f23e763614a4550a905f7ad0298446359;hb=3568bda98bc24d41e7f5a253a56b258c9aae86fc;hp=8040b2e53a1a20805cd1f8b891f90af790d213d0;hpb=e00d61acf4f772083500a04783a8bce56dc322bf;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm index 8040b2e..cfaa902 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm @@ -310,14 +310,19 @@ sub _columns_info_for { $info->{original}{data_type} = 'currency'; if (ref $info->{size} eq 'ARRAY' && $info->{size}[0] == 19 && $info->{size}[1] == 4) { - # Actual money column via ODBC, otherwise we pass the sizes on to the ADO driver for decimal - # columns (which masquerade as money columns...) + # Actual money column via ODBC, otherwise we pass the sizes on to the ADO driver for + # decimal columns (which masquerade as money columns...) + delete $info->{size}; + } + } + elsif ($data_type eq 'decimal') { + if (ref $info->{size} eq 'ARRAY' && $info->{size}[0] == 18 && $info->{size}[1] == 0) { delete $info->{size}; } } # Pass through currency (which can be decimal for ADO.) - if ($data_type !~ /^(?:(?:var)?(?:char|binary))\z/ && $data_type ne 'currency') { + if ($data_type !~ /^(?:(?:var)?(?:char|binary)|decimal)\z/ && $data_type ne 'currency') { delete $info->{size}; } }