[Dbix-class] A patch for DBIx::Class::Loader::SQLite

Brandon Black blblack at gmail.com
Mon Jan 23 07:33:13 CET 2006


On 1/22/06, Ishigaki Kenichi <ishigaki at tcool.org> wrote:
> Hi. DBIx::Class::Loader::SQLite does something wrong about PK detection.
> Below is a patch to fix.
>
> --- SQLite.pm   Tue Dec 20 18:17:27 2005
> +++ SQLite_patched.pm   Mon Jan 23 01:13:44 2006
> @@ -138,7 +138,7 @@
>          @pks = ($primary);
>      }
>      else {
> -        my ($pks) = $sql =~ m/PRIMARY\s+KEY\s*\(\s*([^)]+)\s*\)/;
> +        my ($pks) = $sql =~ m/PRIMARY\s+KEY\s*\(\s*([^)]+)\s*\)/i;
>          @pks = split( m/\s*\,\s*/, $pks ) if $pks;
>      }
>      return ( \@columns, \@pks );
>

Thanks for the patch.  Applied to trunk for ::Loader and
::Schema::Loader, will show up in the next revisions.

-- Brandon



More information about the Dbix-class mailing list