r45161 - in /trunk/sqlfairy: ./ debian/ lib/SQL/ lib/SQL/Translator/Parser/ lib/SQL/Translator/Parser/XML/ lib/SQL/Translator/Schema/ lib/Test/SQL/ script/ t/ t/data/

ryan at users.alioth.debian.org ryan at users.alioth.debian.org
Thu Oct 1 14:21:53 UTC 2009


Author: ryan
Date: Thu Oct  1 14:21:46 2009
New Revision: 45161

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45161
Log:
New upstream release

Modified:
    trunk/sqlfairy/Changes
    trunk/sqlfairy/META.yml
    trunk/sqlfairy/Makefile.PL
    trunk/sqlfairy/debian/changelog
    trunk/sqlfairy/lib/SQL/Translator.pm
    trunk/sqlfairy/lib/SQL/Translator/Parser/PostgreSQL.pm
    trunk/sqlfairy/lib/SQL/Translator/Parser/XML/SQLFairy.pm
    trunk/sqlfairy/lib/SQL/Translator/Schema/Constraint.pm
    trunk/sqlfairy/lib/Test/SQL/Translator.pm
    trunk/sqlfairy/script/sqlt
    trunk/sqlfairy/t/14postgres-parser.t
    trunk/sqlfairy/t/18ttschema-producer.t
    trunk/sqlfairy/t/33tt-table-producer.t
    trunk/sqlfairy/t/34tt-base.t
    trunk/sqlfairy/t/36-filters.t
    trunk/sqlfairy/t/60roundtrip.t
    trunk/sqlfairy/t/data/roundtrip.xml
    trunk/sqlfairy/t/data/roundtrip_autogen.yaml

Modified: trunk/sqlfairy/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/Changes?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/Changes (original)
+++ trunk/sqlfairy/Changes Thu Oct  1 14:21:46 2009
@@ -1,3 +1,11 @@
+# ----------------------------------------------------------
+# 0.11003 2009-09-28
+# ----------------------------------------------------------
+* Pg parser fixes to deal properly with MATCH <type>
+* Pg parser fixes to parse timestamp attributes correctly
+* Fix broken default detection in script/sqlt (RT#27438)
+* Fix dependency issues with LibXML and TT
+
 # ----------------------------------------------------------
 # 0.11002 2009-08-30
 # ----------------------------------------------------------
@@ -22,32 +30,32 @@
 # 0.10 2009-08-13
 # ----------------------------------------------------------
 * Resolved the following RT bugs (thanks to everyone for reporting!):
-25791   does not recognize PostgreSQL ON_ERROR_STOP 
-29265   sqlt-diagram: --natural-join needs Graph::Directed  
-37814   SQLite translator failing to parse schema   
+25791   does not recognize PostgreSQL ON_ERROR_STOP
+29265   sqlt-diagram: --natural-join needs Graph::Directed
+37814   SQLite translator failing to parse schema
 42548   Producer::PostgreSQL incorrectly inserts the size in
         'time(stamp)? with(out) time zone' fields
-43173   SQL::Translator::Parser without versionnumber - will install 
-        old 0.09002    
-46805   (No subject)    
-47026   META.yml is not packaged due to MANIFEST.SKIP (easyfix) 
-32130   Move from XML::XPath to XML::LibXML::XPathContext   
-22261   MySQL parse 
-13915   missing optional prerequisite cause make test to fail   
-8847    Diagram.pm: BINMODE missing in printing of graphic file.    
-21065   GraphViz producer fails on tables named 'node'  
-35448   Producer::PostgreSQL types without size 
-22026   sqlt-diagram uses -f arg twice  
-47897   [PATCH] Fix uninitialized value within @_ in (uc|lc)    
-47668   Mysql Parser doesn't recognize key types    
-46448   sqlt-graph errors out on MySQL DDL with btree keys  
-47176   Add Foreign Key support to Parser::DBI::PostgreSQL.pm   
-48025   MySQL Producer: Case inconsistency between elements in 
-        @no_length_attr and $data_type   
-48569   sqlt-diagram fails to load SQLite schema    
-48596   SQL::Translator::Diff::schema_diff should produce a list in 
-        list context    
-44907   SQL::Translator::Producer::PostgreSQL produce() in list context 
+43173   SQL::Translator::Parser without versionnumber - will install
+        old 0.09002
+46805   (No subject)
+47026   META.yml is not packaged due to MANIFEST.SKIP (easyfix)
+32130   Move from XML::XPath to XML::LibXML::XPathContext
+22261   MySQL parse
+13915   missing optional prerequisite cause make test to fail
+8847    Diagram.pm: BINMODE missing in printing of graphic file.
+21065   GraphViz producer fails on tables named 'node'
+35448   Producer::PostgreSQL types without size
+22026   sqlt-diagram uses -f arg twice
+47897   [PATCH] Fix uninitialized value within @_ in (uc|lc)
+47668   Mysql Parser doesn't recognize key types
+46448   sqlt-graph errors out on MySQL DDL with btree keys
+47176   Add Foreign Key support to Parser::DBI::PostgreSQL.pm
+48025   MySQL Producer: Case inconsistency between elements in
+        @no_length_attr and $data_type
+48569   sqlt-diagram fails to load SQLite schema
+48596   SQL::Translator::Diff::schema_diff should produce a list in
+        list context
+44907   SQL::Translator::Producer::PostgreSQL produce() in list context
         should return a list of statements
 
 # ----------------------------------------------------------
@@ -72,12 +80,9 @@
 # ----------------------------------------------------------
 * Add parser support for MySQL default values with a single quote
 * Properly quote absolute table names in the MySQL producer
-<<<<<<< .mine
 * Added CREATE VIEW subrules for mysql parser (wreis)
 * Many fixes to code and tests for trigger's "database_events"
-=======
 * Added semi-colon for (DROP|CREATE) TYPE statements in the Pg producer (wreis)
-* Added CREATE VIEW subrules for mysql parser (wreis)
 * ALTER TABLE/ALTER COLUMN/DROP DEFAULT support in Pg producer (mo)
 * XML parser support for multi-event triggers
 * SQLite producer support for multi-event triggers
@@ -103,7 +108,6 @@
       - Support parsing of all DROP clauses
       - Support parsing of field-level comments
       - When producing do not append table names to constraint/index names
->>>>>>> .r1584
 
 # ----------------------------------------------------------
 # 0.09004 2009-02-13

Modified: trunk/sqlfairy/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/META.yml?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/META.yml (original)
+++ trunk/sqlfairy/META.yml Thu Oct  1 14:21:46 2009
@@ -28,7 +28,7 @@
     file: lib/SQL/Translator/Parser/DB2/Grammar.pm
   SQL::Translator:
     file: lib/SQL/Translator.pm
-    version: 0.11002
+    version: 0.11003
   SQL::Translator::Diff:
     file: lib/SQL/Translator/Diff.pm
   SQL::Translator::Filter::DefaultExtra:
@@ -231,7 +231,7 @@
   Graph::Directed: 0
   GraphViz: 0
   Spreadsheet::ParseExcel: 0.41
-  Template: 2.1
+  Template: 2.2
   Text::ParseWords: 0
   Text::RecordParser: 0.02
   XML::LibXML: 1.69
@@ -256,4 +256,4 @@
   bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=SQL-Translator
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://sqlfairy.svn.sourceforge.net/svnroot/sqlfairy
-version: 0.11002
+version: 0.11003

Modified: trunk/sqlfairy/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/Makefile.PL?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/Makefile.PL (original)
+++ trunk/sqlfairy/Makefile.PL Thu Oct  1 14:21:46 2009
@@ -23,7 +23,7 @@
     'XML::Writer'              => 0.500,
   },
   recommends => {
-    'Template'                 => 2.10,
+    'Template'                 => 2.20,
     'GD'                       => 0,
     'GraphViz'                 => 0,
     'Graph::Directed'          => 0,

Modified: trunk/sqlfairy/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/debian/changelog?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/debian/changelog (original)
+++ trunk/sqlfairy/debian/changelog Thu Oct  1 14:21:46 2009
@@ -1,4 +1,4 @@
-sqlfairy (0.11002-2) UNRELEASED; urgency=low
+sqlfairy (0.11003-1) UNRELEASED; urgency=low
 
   * Take over for the Debian Perl Group; Closes: #548901 -- RFA
   * debian/control: Added: Vcs-Svn field (source stanza). Changed:
@@ -11,8 +11,9 @@
   * Add myself to Uploaders
   * Add debian/README.source to document quilt usage, as required by
     Debian Policy since 3.8.0.
+  * New upstream release
 
- -- Ryan Niebur <ryan at debian.org>  Thu, 01 Oct 2009 07:12:53 -0700
+ -- Ryan Niebur <ryan at debian.org>  Thu, 01 Oct 2009 07:15:50 -0700
 
 sqlfairy (0.11002-1) unstable; urgency=low
 

Modified: trunk/sqlfairy/lib/SQL/Translator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/lib/SQL/Translator.pm?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/lib/SQL/Translator.pm (original)
+++ trunk/sqlfairy/lib/SQL/Translator.pm Thu Oct  1 14:21:46 2009
@@ -24,7 +24,7 @@
 
 require 5.005;
 
-$VERSION  = '0.11002';
+$VERSION  = '0.11003';
 $DEBUG    = 0 unless defined $DEBUG;
 $ERROR    = "";
 

Modified: trunk/sqlfairy/lib/SQL/Translator/Parser/PostgreSQL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/lib/SQL/Translator/Parser/PostgreSQL.pm?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/lib/SQL/Translator/Parser/PostgreSQL.pm (original)
+++ trunk/sqlfairy/lib/SQL/Translator/Parser/PostgreSQL.pm Thu Oct  1 14:21:46 2009
@@ -610,9 +610,9 @@
             $return = { type => 'bytea' };
         }
     |
-    /(timestamptz|timestamp)(?:\(\d\))?( with(out)? time zone)?/i
-        { 
-            $return = { type => 'timestamp' };
+    /(timestamptz|timestamp)(?:\(\d\))?( with(?:out)? time zone)?/i
+        { 
+            $return = { type => 'timestamp' . ($2||'') };
         }
     |
     /text/i
@@ -660,7 +660,7 @@
             deferred         => $item{'deferred'},
             reference_table  => $desc->{'reference_table'},
             reference_fields => $desc->{'reference_fields'},
-            match_type       => $desc->{'match_type'}[0],
+            match_type       => $desc->{'match_type'},
             on_delete        => $desc->{'on_delete'} || $desc->{'on_delete_do'},
             on_update        => $desc->{'on_update'} || $desc->{'on_update_do'},
             comments         => [ @comments ],
@@ -718,9 +718,7 @@
 
 deferred : /initially/i /(deferred|immediate)/i { $item[2] }
 
-match_type : /match full/i { 'match_full' }
-    |
-    /match partial/i { 'match_partial' }
+match_type : /match/i /partial|full|simple/i { $item[2] }
 
 key_action : key_delete 
     |

Modified: trunk/sqlfairy/lib/SQL/Translator/Parser/XML/SQLFairy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/lib/SQL/Translator/Parser/XML/SQLFairy.pm?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/lib/SQL/Translator/Parser/XML/SQLFairy.pm (original)
+++ trunk/sqlfairy/lib/SQL/Translator/Parser/XML/SQLFairy.pm Thu Oct  1 14:21:46 2009
@@ -110,7 +110,7 @@
 
 use base qw/SQL::Translator::Parser/;  # Doesnt do anything at the mo!
 use SQL::Translator::Utils 'debug';
-use XML::LibXML;
+use XML::LibXML 1.69;
 use XML::LibXML::XPathContext;
 
 sub parse {

Modified: trunk/sqlfairy/lib/SQL/Translator/Schema/Constraint.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/lib/SQL/Translator/Schema/Constraint.pm?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/lib/SQL/Translator/Schema/Constraint.pm (original)
+++ trunk/sqlfairy/lib/SQL/Translator/Schema/Constraint.pm Thu Oct  1 14:21:46 2009
@@ -285,7 +285,7 @@
 =head2 match_type
 
 Get or set the constraint's match_type.  Only valid values are "full"
-or "partial."
+"partial" and "simple"
 
   my $match_type = $constraint->match_type('FULL');
 
@@ -296,7 +296,7 @@
     if ( $arg ) {
         $arg = lc $arg;
         return $self->error("Invalid match type: $arg")
-            unless $arg eq 'full' || $arg eq 'partial';
+            unless $arg eq 'full' || $arg eq 'partial' || $arg eq 'simple';
         $self->{'match_type'} = $arg;
     }
 

Modified: trunk/sqlfairy/lib/Test/SQL/Translator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/lib/Test/SQL/Translator.pm?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/lib/Test/SQL/Translator.pm (original)
+++ trunk/sqlfairy/lib/Test/SQL/Translator.pm Thu Oct  1 14:21:46 2009
@@ -466,11 +466,16 @@
 
     for my $module (@modules) {
         eval "use $module;";
-        if ($@ && $@ =~ /Can't locate (\S+)/) {
+        next if !$@;
+
+        if ($@ =~ /Can't locate (\S+)/) {
             my $mod = $1;
             $mod =~ s/\.pm$//;
             $mod =~ s#/#::#g;
             push @errors, $mod;
+        }
+        elsif ($@ =~ /([\w\:]+ version [\d\.]+) required.+?this is only version/) {
+            push @errors, $1;
         }
     }
 

Modified: trunk/sqlfairy/script/sqlt
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/script/sqlt?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/script/sqlt (original)
+++ trunk/sqlfairy/script/sqlt Thu Oct  1 14:21:46 2009
@@ -283,8 +283,8 @@
     no_comments          => $no_comments    ||  0,
     show_warnings        => $show_warnings  ||  0,
     add_drop_table       => $add_drop_table ||  0,
-    quote_table_names    => $quote_table_names ||  1,
-    quote_field_names    => $quote_field_names ||  1,
+    quote_table_names    => defined $quote_table_names ? $quote_table_names : 1,
+    quote_field_names    => defined $quote_field_names ? $quote_field_names : 1,
     validate             => $validate       ||  0,
     parser_args          => {
         trim_fields      => $no_trim ? 0 : 1,

Modified: trunk/sqlfairy/t/14postgres-parser.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/14postgres-parser.t?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/14postgres-parser.t (original)
+++ trunk/sqlfairy/t/14postgres-parser.t Thu Oct  1 14:21:46 2009
@@ -8,7 +8,7 @@
 use Test::SQL::Translator qw(maybe_plan);
 
 BEGIN {
-    maybe_plan(120, 'SQL::Translator::Parser::PostgreSQL');
+    maybe_plan(129, 'SQL::Translator::Parser::PostgreSQL');
     SQL::Translator::Parser::PostgreSQL->import('parse');
 }
 
@@ -63,7 +63,9 @@
     alter table only t_test1 add constraint c_u1 unique (f_varchar);
 
     alter table t_test1 add constraint "c_fk2" foreign key (f_fk2)
-    references t_test2 (f_id) on update no action on delete cascade;
+    references t_test2 (f_id) match simple
+    on update no action on delete cascade deferrable;
+
 
     alter table t_test1 drop column f_dropped restrict;
 
@@ -197,12 +199,22 @@
 
 my $f11 = shift @t1_fields;
 is( $f11->name, 'f_timestamp', 'Eleventh field is "f_timestamp"' );
-is( $f11->data_type, 'timestamp', 'Field is a timestamp' );
+is( $f11->data_type, 'timestamp with time zone', 'Field is a timestamp with time zone' );
 is( $f11->is_nullable, 1, 'Field can be null' );
 is( $f11->size, 0, 'Size is "0"' );
 is( $f11->default_value, undef, 'Default value is "undef"' );
 is( $f11->is_primary_key, 0, 'Field is not PK' );
 is( $f11->is_foreign_key, 0, 'Field is not FK' );
+
+my $f12 = shift @t1_fields;
+is( $f12->name, 'f_timestamp2', '12th field is "f_timestamp2"' );
+is( $f12->data_type, 'timestamp without time zone', 'Field is a timestamp without time zone' );
+is( $f12->is_nullable, 1, 'Field can be null' );
+is( $f12->size, 0, 'Size is "0"' );
+is( $f12->default_value, undef, 'Default value is "undef"' );
+is( $f12->is_primary_key, 0, 'Field is not PK' );
+is( $f12->is_foreign_key, 0, 'Field is not FK' );
+
 # my $fk_ref2 = $f11->foreign_key_reference;
 # isa_ok( $fk_ref2, 'SQL::Translator::Schema::Constraint', 'FK' );
 # is( $fk_ref2->reference_table, 't_test2', 'FK is to "t_test2" table' );
@@ -231,6 +243,8 @@
 is( join(',', $c4->reference_fields), 'f_id', 'Constraint is to field "f_id"' );
 is( $c4->on_delete, 'cascade', 'On delete: cascade' );
 is( $c4->on_update, 'no_action', 'On delete: no action' );
+is( $c4->match_type, 'simple', 'Match type: simple' );
+is( $c4->deferrable, 1, 'Deferrable detected' );
 
 my $t2 = shift @tables;
 is( $t2->name, 't_test2', 'Table t_test2 exists' );

Modified: trunk/sqlfairy/t/18ttschema-producer.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/18ttschema-producer.t?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/18ttschema-producer.t (original)
+++ trunk/sqlfairy/t/18ttschema-producer.t Thu Oct  1 14:21:46 2009
@@ -16,16 +16,9 @@
 #=============================================================================
 
 BEGIN {
-    eval {require Template;};
-
-    if ( $@ ) {
-        plan skip_all => 'Template not installed?'
-    }
-
-    maybe_plan(6, 
-        'XML::XPath', 
+    maybe_plan(6,
         'SQL::Translator::Parser::XML::SQLFairy',
-        'Template', 
+        'Template 2.20',
         'Test::Differences'
     );
 }

Modified: trunk/sqlfairy/t/33tt-table-producer.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/33tt-table-producer.t?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/33tt-table-producer.t (original)
+++ trunk/sqlfairy/t/33tt-table-producer.t Thu Oct  1 14:21:46 2009
@@ -21,9 +21,7 @@
 #=============================================================================
 
 BEGIN {
-    eval {require Template;};
-
-    maybe_plan(8, 'Template', 'Test::Differences')
+    maybe_plan(8, 'Template 2.20', 'Test::Differences')
 }
 use Test::Differences;
 

Modified: trunk/sqlfairy/t/34tt-base.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/34tt-base.t?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/34tt-base.t (original)
+++ trunk/sqlfairy/t/34tt-base.t Thu Oct  1 14:21:46 2009
@@ -10,8 +10,8 @@
 use Test::SQL::Translator qw(maybe_plan);
 
 BEGIN {
-    maybe_plan(4, 'Template', 
-               'Test::Differences', 
+    maybe_plan(4, 'Template 2.20',
+               'Test::Differences',
                'SQL::Translator::Parser::XML::SQLFairy')
 }
 use Test::Differences;

Modified: trunk/sqlfairy/t/36-filters.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/36-filters.t?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/36-filters.t (original)
+++ trunk/sqlfairy/t/36-filters.t Thu Oct  1 14:21:46 2009
@@ -42,7 +42,7 @@
 use Data::Dumper;
 
 BEGIN {
-    maybe_plan(16, 'Template', 'Test::Differences',
+    maybe_plan(16, 'Template 2.20', 'Test::Differences',
                'SQL::Translator::Parser::YAML',
               'SQL::Translator::Producer::YAML')
 

Modified: trunk/sqlfairy/t/60roundtrip.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/60roundtrip.t?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/60roundtrip.t (original)
+++ trunk/sqlfairy/t/60roundtrip.t Thu Oct  1 14:21:46 2009
@@ -16,7 +16,7 @@
 my $plan = [
   {
     engine => 'XML',
-    req => 'XML::LibXML',
+    req => 'XML::LibXML 1.69',
   },
   {
     engine => 'YAML',
@@ -111,7 +111,7 @@
     my @req = ref $args->{req} ? @{$args->{req}} : $args->{req}||();
     my @missing;
     for (@req) {
-      eval "require $_";
+      eval "use $_ ()";
       push @missing, $_ if ($@);
     }
     if (@missing) {

Modified: trunk/sqlfairy/t/data/roundtrip.xml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/data/roundtrip.xml?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/data/roundtrip.xml (original)
+++ trunk/sqlfairy/t/data/roundtrip.xml Thu Oct  1 14:21:46 2009
@@ -54,7 +54,7 @@
               <extra foo="bar" hello="world" bar="baz" />
           </constraint>
           <constraint name="emailuniqueindex" type="UNIQUE" fields="email" />
-          <constraint name="" type="FOREIGN KEY" fields="another_id"
+          <constraint name="Basic" type="FOREIGN KEY" fields="another_id"
               reference_table="Another" options="" deferrable="1" match_type=""
               expression="" on_update="" on_delete="">
           </constraint>

Modified: trunk/sqlfairy/t/data/roundtrip_autogen.yaml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/sqlfairy/t/data/roundtrip_autogen.yaml?rev=45161&op=diff
==============================================================================
--- trunk/sqlfairy/t/data/roundtrip_autogen.yaml (original)
+++ trunk/sqlfairy/t/data/roundtrip_autogen.yaml Thu Oct  1 14:21:46 2009
@@ -85,7 +85,7 @@
           fields:
             - another_id
           match_type: ''
-          name: ''
+          name: Basic
           on_delete: ''
           on_update: ''
           options: []
@@ -257,4 +257,4 @@
   producer_type: SQL::Translator::Producer::YAML
   show_warnings: 0
   trace: 0
-  version: 0.11002
+  version: 0.11003




More information about the Pkg-perl-cvs-commits mailing list