Add DECIMAL_DIGITS to SQLServer size field for scale info
Jonathan C. Otsuka [Wed, 10 Oct 2012 16:59:44 +0000 (11:59 -0500)]
http://msdn.microsoft.com/en-us/library/aa258832(v=sql.80).aspx

Changes
lib/SQL/Translator/Parser/DBI/SQLServer.pm

diff --git a/Changes b/Changes
index 57d4b01..95aaf23 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,4 +1,5 @@
 * Apply quotes to fix tables that are reserved words, DBI::SQLServer (Jonathan C. Otsuka)
+* Add DECIMAL_DIGITS to field size for scale info, DBI::SQLServer (Jonathan C. Otsuka)
 * De-linkify XML namespace in docs (RT#81838)
 * Allow both single and double quotes for values in MySQL parser
 * Fix diff for altering two things per column - add ; at the end
index 072def8..dba7298 100644 (file)
@@ -200,7 +200,7 @@ $table_info->{TABLE_TYPE},
                                           name        => $c->{COLUMN_NAME},
                                           data_type   => $c->{TYPE_NAME},
                                           order       => $c->{ORDINAL_POSITION},
-                                          size        => $c->{COLUMN_SIZE},
+                                          size        => [$c->{COLUMN_SIZE},$c->{DECIMAL_DIGITS}],
                                          ) || die $table->error;
                 $f->is_nullable($c->{NULLABLE} == 1);
                 $f->is_auto_increment($is_auto_increment);