Refs #29350 -- Fixed 'invalid escape sequence' warning in SQLite introspection.
This commit is contained in:
parent
c4158d050f
commit
7ac3008fe4
|
@ -192,7 +192,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
|||
fields_sql = create_sql[create_sql.index('(') + 1:create_sql.rindex(')')]
|
||||
for field_desc in fields_sql.split(','):
|
||||
field_desc = field_desc.strip()
|
||||
m = re.match('(?:(?:["`\[])(.*)(?:["`\]])|(\w+)).*PRIMARY KEY.*', field_desc)
|
||||
m = re.match(r'(?:(?:["`\[])(.*)(?:["`\]])|(\w+)).*PRIMARY KEY.*', field_desc)
|
||||
if m:
|
||||
return m.group(1) if m.group(1) else m.group(2)
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue