From: Jonathan C. Otsuka Date: Wed, 10 Oct 2012 16:59:44 +0000 (-0500) Subject: Add DECIMAL_DIGITS to SQLServer size field for scale info X-Git-Tag: v0.011017~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=beee10ec5947450478a177c43b64e69300650d5d;hp=45f19683cbecba08bf68f7e7559a0eb411821b25;p=dbsrgits%2FSQL-Translator.git Add DECIMAL_DIGITS to SQLServer size field for scale info http://msdn.microsoft.com/en-us/library/aa258832(v=sql.80).aspx --- diff --git a/Changes b/Changes index 57d4b01..95aaf23 100644 --- 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 diff --git a/lib/SQL/Translator/Parser/DBI/SQLServer.pm b/lib/SQL/Translator/Parser/DBI/SQLServer.pm index 072def8..dba7298 100644 --- a/lib/SQL/Translator/Parser/DBI/SQLServer.pm +++ b/lib/SQL/Translator/Parser/DBI/SQLServer.pm @@ -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);