MCPcopy
hub / github.com/django/django / database_forwards

Method database_forwards

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

Source from the content-addressed store, hash-verified

394 state.remove_model(app_label, self.name_lower)
395
396 def database_forwards(self, app_label, schema_editor, from_state, to_state):
397 model = from_state.apps.get_model(app_label, self.name)
398 if self.allow_migrate_model(schema_editor.connection.alias, model):
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)

Callers 4

test_delete_modelMethod · 0.95
test_delete_mti_modelMethod · 0.95

Calls 3

get_modelMethod · 0.45
allow_migrate_modelMethod · 0.45
delete_modelMethod · 0.45

Tested by 4

test_delete_modelMethod · 0.76
test_delete_mti_modelMethod · 0.76