mirror of
https://github.com/django/django.git
synced 2025-06-07 12:39:12 +00:00
Handled failing tests.
This commit is contained in:
parent
760bb3a4c8
commit
073a2f7cde
@ -919,7 +919,11 @@ class BaseDatabaseSchemaEditor:
|
|||||||
fks_dropped = set()
|
fks_dropped = set()
|
||||||
if (
|
if (
|
||||||
self.connection.features.supports_foreign_keys
|
self.connection.features.supports_foreign_keys
|
||||||
and self.connection.features.requires_fk_constraints_to_be_recreated
|
and (
|
||||||
|
self.connection.features.requires_fk_constraints_to_be_recreated
|
||||||
|
or not old_field.related_model == new_field.related_model
|
||||||
|
or getattr(new_field, "db_constraint", True) is False
|
||||||
|
)
|
||||||
and old_field.remote_field
|
and old_field.remote_field
|
||||||
and old_field.db_constraint
|
and old_field.db_constraint
|
||||||
and self._field_should_be_altered(
|
and self._field_should_be_altered(
|
||||||
|
@ -14,10 +14,20 @@
|
|||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": {
|
"default": {
|
||||||
"ENGINE": "django.db.backends.sqlite3",
|
"ENGINE": "django.db.backends.postgresql",
|
||||||
|
"NAME": "django",
|
||||||
|
"USER": "postgres",
|
||||||
|
"PASSWORD": "postgres",
|
||||||
|
"HOST": "127.0.0.1",
|
||||||
|
"PORT": "5432",
|
||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"ENGINE": "django.db.backends.sqlite3",
|
"ENGINE": "django.db.backends.postgresql",
|
||||||
|
"NAME": "django",
|
||||||
|
"USER": "postgres",
|
||||||
|
"PASSWORD": "postgres",
|
||||||
|
"HOST": "127.0.0.1",
|
||||||
|
"PORT": "5432",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user