fix case-sensitivity in UNIQUE parsing for SQLite
Brandon Black [Mon, 9 Apr 2007 13:12:53 +0000 (13:12 +0000)]
lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm

index 8ca2d66..10af19b 100644 (file)
@@ -77,12 +77,12 @@ sub _sqlite_parse_table {
         # Grab reference
         chomp $col;
 
-        if($col =~ /^(.*)\s+UNIQUE/) {
+        if($col =~ /^(.*)\s+UNIQUE/i) {
             my $colname = $1;
             $colname =~ s/\s+.*$//;
             push(@uniqs, [ "${colname}_unique" => [ lc $colname ] ]);
         }
-        elsif($col =~/^\s*UNIQUE\s*\(\s*(.*)\)/) {
+        elsif($col =~/^\s*UNIQUE\s*\(\s*(.*)\)/i) {
             my $cols = $1;
             $cols =~ s/\s+$//;
             my @cols = map { lc } split(/\s*,\s*/, $cols);