mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #27097 -- Added index type introspection to built-in db backends.
This commit is contained in:
@@ -255,8 +255,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||
"index": True,
|
||||
}
|
||||
constraints[index]['columns'].append(column)
|
||||
# Add column orders for indexes
|
||||
# Add type and column orders for indexes
|
||||
if constraints[index]['index'] and not constraints[index]['unique']:
|
||||
# SQLite doesn't support any index type other than b-tree
|
||||
constraints[index]['type'] = 'btree'
|
||||
cursor.execute(
|
||||
"SELECT sql FROM sqlite_master "
|
||||
"WHERE type='index' AND name=%s" % self.connection.ops.quote_name(index)
|
||||
|
||||
Reference in New Issue
Block a user