def METHOD_NAME(apps, schema_editor):
    Field = apps.get_model("database", "Field")
    FormulaField = apps.get_model("database", "FormulaField")
    FieldDependency = apps.get_model("database", "FieldDependency")
    LinkRowField = apps.get_model("database", "LinkRowField")
    _build_graph_from_scratch(FieldDependency, FormulaField, LinkRowField, Field)