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:
parent
44867ce5c5
commit
f66f362a4c
1 changed files with 1 additions and 1 deletions
|
@ -208,7 +208,7 @@ sub primary_key_info {
|
||||||
my @pk = split /\s*,\s*/, $2 || '';
|
my @pk = split /\s*,\s*/, $2 || '';
|
||||||
unless (@pk) {
|
unless (@pk) {
|
||||||
my $prefix = $1;
|
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];
|
$prefix = (split /\s*,\s*/, $prefix)[-1];
|
||||||
@pk = (split /\s+/, $prefix)[0]; # take first word as name
|
@pk = (split /\s+/, $prefix)[0]; # take first word as name
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue