(self, app_label, schema_editor, from_state, to_state)
| 178 | ) |
| 179 | |
| 180 | def database_backwards(self, app_label, schema_editor, from_state, to_state): |
| 181 | to_model = to_state.apps.get_model(app_label, self.model_name) |
| 182 | if self.allow_migrate_model(schema_editor.connection.alias, to_model): |
| 183 | from_model = from_state.apps.get_model(app_label, self.model_name) |
| 184 | schema_editor.add_field(from_model, to_model._meta.get_field(self.name)) |
| 185 | |
| 186 | def describe(self): |
| 187 | return "Remove field %s from %s" % (self.name, self.model_name) |