1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

DBD::SQLite: applied a patch to fix wrong primary key [RT #34408]

This commit is contained in:
Kenichi Ishigaki 2009-01-29 02:53:17 +00:00
parent 44867ce5c5
commit f66f362a4c

View file

@ -208,7 +208,7 @@ sub primary_key_info {
my @pk = split /\s*,\s*/, $2 || '';
unless (@pk) {
my $prefix = $1;
$prefix =~ s/.*create\s+table\s+.*?\(\s*//i;
$prefix =~ s/.*create\s+table\s+.*?\(\s*//si;
$prefix = (split /\s*,\s*/, $prefix)[-1];
@pk = (split /\s+/, $prefix)[0]; # take first word as name
}