From: Peter Rabbitson Date: Sat, 3 Oct 2009 18:11:03 +0000 (+0000) Subject: Oracle/SQLite test adjustments to deal with new testdata field X-Git-Tag: v0.11008~76 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9190556bfd4424ae3cc15c7b3085045b43d7c110;p=dbsrgits%2FSQL-Translator.git Oracle/SQLite test adjustments to deal with new testdata field --- diff --git a/lib/SQL/Translator/Producer/Oracle.pm b/lib/SQL/Translator/Producer/Oracle.pm index 2ae0f3f..a1bf01d 100644 --- a/lib/SQL/Translator/Producer/Oracle.pm +++ b/lib/SQL/Translator/Producer/Oracle.pm @@ -616,7 +616,7 @@ sub create_field { $field_def .= " $data_type"; if ( defined $size[0] && $size[0] > 0 ) { - $field_def .= '(' . join( ', ', @size ) . ')'; + $field_def .= '(' . join( ',', @size ) . ')'; } # diff --git a/t/48xml-to-sqlite.t b/t/48xml-to-sqlite.t index 61b049d..60a607a 100644 --- a/t/48xml-to-sqlite.t +++ b/t/48xml-to-sqlite.t @@ -60,7 +60,8 @@ CREATE UNIQUE INDEX emailuniqueindex ON Basic (email); DROP TABLE Another; CREATE TABLE Another ( - id INTEGER PRIMARY KEY NOT NULL + id INTEGER PRIMARY KEY NOT NULL, + num numeric(10,2) ); DROP VIEW IF EXISTS email_list; @@ -109,7 +110,8 @@ eq_or_diff(\@sql, 'CREATE UNIQUE INDEX emailuniqueindex ON Basic (email)', 'DROP TABLE Another', 'CREATE TABLE Another ( - id INTEGER PRIMARY KEY NOT NULL + id INTEGER PRIMARY KEY NOT NULL, + num numeric(10,2) )', 'DROP VIEW IF EXISTS email_list; CREATE VIEW email_list AS diff --git a/t/51-xml-to-oracle.t b/t/51-xml-to-oracle.t index ec115b1..39931ca 100644 --- a/t/51-xml-to-oracle.t +++ b/t/51-xml-to-oracle.t @@ -59,6 +59,7 @@ my $want = [ 'CREATE SEQUENCE sq_Another_id', 'CREATE TABLE Another ( id number(10) NOT NULL, + num number(10,2), PRIMARY KEY (id) )', 'CREATE VIEW email_list AS @@ -125,6 +126,7 @@ CREATE SEQUENCE sq_Another_id01; CREATE TABLE Another ( id number(10) NOT NULL, + num number(10,2), PRIMARY KEY (id) );