MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / state_forward

Method state_forward

tortoise/migrations/operations.py:658–663  ·  view source on GitHub ↗
(self, app_label: str, state: State)

Source from the content-addressed store, hash-verified

656 return f"Add index to {self.model_name}"
657
658 def state_forward(self, app_label: str, state: State) -> None:
659 model_state = self.get_model_state(state, app_label, self.model_name)
660 indexes = _get_option_list(model_state, "indexes")
661 indexes.append(self.index)
662 _set_option_list(model_state, "indexes", indexes)
663 state.reload_model(app_label, self.model_name)
664
665 async def database_forward(
666 self,

Callers

nothing calls this directly

Calls 4

_get_option_listFunction · 0.85
_set_option_listFunction · 0.85
get_model_stateMethod · 0.80
reload_modelMethod · 0.80

Tested by

no test coverage detected