mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #27096 -- Fixed primary key introspection for sqlite3 backend
This commit is contained in:
@@ -214,7 +214,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||
results = results[results.index('(') + 1:results.rindex(')')]
|
||||
for field_desc in results.split(','):
|
||||
field_desc = field_desc.strip()
|
||||
m = re.search('"(.*)".*PRIMARY KEY( AUTOINCREMENT)?$', field_desc)
|
||||
m = re.search('"(.*)".*PRIMARY KEY( AUTOINCREMENT)?', field_desc)
|
||||
if m:
|
||||
return m.groups()[0]
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user