1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #32453 -- Added introspection of unique constraint field ordering on SQLite.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
Hannes Ljungberg
2021-02-17 10:46:40 +01:00
committed by Mariusz Felisiak
parent 45bef6706a
commit 4d99375b46
3 changed files with 30 additions and 2 deletions

View File

@@ -413,7 +413,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
}
constraints[index]['columns'].append(column)
# Add type and column orders for indexes
if constraints[index]['index'] and not constraints[index]['unique']:
if constraints[index]['index']:
# SQLite doesn't support any index type other than b-tree
constraints[index]['type'] = Index.suffix
orders = self._get_index_columns_orders(sql)