1
0
mirror of https://github.com/django/django.git synced 2025-06-05 03:29:12 +00:00

[4.1.x] Fixed #33960 -- Fixed migrations crash on SQLite < 3.26.

Regression in 0b95a96ee10d3e12aef01d449467bcf4641286b4.

Thanks Aristotelis Mikropoulos for the report.
Backport of 4483a9b12f295908e68b82d6599f460de943444f from main
This commit is contained in:
Mariusz Felisiak 2022-08-29 09:55:45 +02:00
parent fca055315e
commit e98869a8a8
2 changed files with 4 additions and 1 deletions

View File

@ -289,7 +289,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
for column_name, (
referenced_column_name,
referenced_table_name,
) in relations:
) in relations.items():
cursor.execute(
"""
SELECT REFERRING.`%s`, REFERRING.`%s` FROM `%s` as REFERRING

View File

@ -52,3 +52,6 @@ Bugfixes
* Reallowed, following a regression in Django 4.1, creating reverse foreign key
managers on unsaved instances (:ticket:`33952`).
* Fixed a regression in Django 4.1 that caused a migration crash on SQLite <
3.20 (:ticket:`33960`).