From: Ken Youens-Clark Date: Thu, 21 Aug 2003 02:26:19 +0000 (+0000) Subject: Increased field sizes to match what PG parser is storing now. X-Git-Tag: v0.04~262 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9bcfe960263b166e9ce2bccc198f700d72cebf86;p=dbsrgits%2FSQL-Translator.git Increased field sizes to match what PG parser is storing now. --- diff --git a/t/14postgres-parser.t b/t/14postgres-parser.t index 58da769..81be458 100644 --- a/t/14postgres-parser.t +++ b/t/14postgres-parser.t @@ -53,7 +53,7 @@ my $f1 = shift @t1_fields; is( $f1->name, 'f_serial', 'First field is "f_serial"' ); is( $f1->data_type, 'integer', 'Field is an integer' ); is( $f1->is_nullable, 0, 'Field cannot be null' ); -is( $f1->size, 4, 'Size is "4"' ); +is( $f1->size, 11, 'Size is "11"' ); is( $f1->default_value, '0', 'Default value is "0"' ); is( $f1->is_primary_key, 1, 'Field is PK' ); is( $f1->is_auto_increment, 1, 'Field is auto increment' ); @@ -71,7 +71,7 @@ my $f3 = shift @t1_fields; is( $f3->name, 'f_double', 'Third field is "f_double"' ); is( $f3->data_type, 'float', 'Field is a float' ); is( $f3->is_nullable, 1, 'Field can be null' ); -is( $f3->size, 8, 'Size is "8"' ); +is( $f3->size, 20, 'Size is "20"' ); is( $f3->default_value, undef, 'Default value is undefined' ); is( $f3->is_primary_key, 0, 'Field is not PK' ); @@ -79,7 +79,7 @@ my $f4 = shift @t1_fields; is( $f4->name, 'f_bigint', 'Fourth field is "f_bigint"' ); is( $f4->data_type, 'integer', 'Field is an integer' ); is( $f4->is_nullable, 0, 'Field cannot be null' ); -is( $f4->size, 8, 'Size is "8"' ); +is( $f4->size, 20, 'Size is "20"' ); is( $f4->default_value, undef, 'Default value is undefined' ); is( $f4->is_primary_key, 0, 'Field is not PK' ); @@ -127,7 +127,7 @@ my $f10 = shift @t1_fields; is( $f10->name, 'f_fk1', 'Tenth field is "f_fk1"' ); is( $f10->data_type, 'integer', 'Field is an integer' ); is( $f10->is_nullable, 0, 'Field cannot be null' ); -is( $f10->size, 4, 'Size is "4"' ); +is( $f10->size, 10, 'Size is "10"' ); is( $f10->default_value, undef, 'Default value is undefined' ); is( $f10->is_primary_key, 0, 'Field is not PK' ); is( $f10->is_foreign_key, 1, 'Field is a FK' ); @@ -139,7 +139,7 @@ my $f11 = shift @t1_fields; is( $f11->name, 'f_fk2', 'Eleventh field is "f_fk2"' ); is( $f11->data_type, 'integer', 'Field is an integer' ); is( $f11->is_nullable, 1, 'Field can be null' ); -is( $f11->size, 4, 'Size is "4"' ); +is( $f11->size, 10, 'Size is "10"' ); is( $f11->default_value, undef, 'Default value is undefined' ); is( $f11->is_primary_key, 0, 'Field is not PK' ); is( $f11->is_foreign_key, 1, 'Field is a FK' ); @@ -182,7 +182,7 @@ my $t2_f1 = shift @t2_fields; is( $t2_f1->name, 'f_id', 'First field is "f_id"' ); is( $t2_f1->data_type, 'integer', 'Field is an integer' ); is( $t2_f1->is_nullable, 0, 'Field cannot be null' ); -is( $t2_f1->size, 4, 'Size is "4"' ); +is( $t2_f1->size, 10, 'Size is "10"' ); is( $t2_f1->default_value, undef, 'Default value is undefined' ); is( $t2_f1->is_primary_key, 1, 'Field is PK' );