MCPcopy
hub / github.com/django/django / database_backwards

Method database_backwards

django/db/migrations/operations/models.py:401–404  ·  view source on GitHub ↗
(self, app_label, schema_editor, from_state, to_state)

Source from the content-addressed store, hash-verified

399 schema_editor.delete_model(model)
400
401 def database_backwards(self, app_label, schema_editor, from_state, to_state):
402 model = to_state.apps.get_model(app_label, self.name)
403 if self.allow_migrate_model(schema_editor.connection.alias, model):
404 schema_editor.create_model(model)
405
406 def references_model(self, name, app_label):
407 # The deleted model could be referencing the specified model through

Callers 4

test_delete_modelMethod · 0.95
test_delete_mti_modelMethod · 0.95

Calls 3

get_modelMethod · 0.45
allow_migrate_modelMethod · 0.45
create_modelMethod · 0.45

Tested by 4

test_delete_modelMethod · 0.76
test_delete_mti_modelMethod · 0.76