Take a list of 2-tuples of the form (migration instance, False) and apply them in the order they occur in the full_plan.
(self, state, plan, full_plan, fake, fake_initial)
| 147 | return state |
| 148 | |
| 149 | def _migrate_all_forwards(self, state, plan, full_plan, fake, fake_initial): |
| 150 | """ |
| 151 | Take a list of 2-tuples of the form (migration instance, False) and |
| 152 | apply them in the order they occur in the full_plan. |
| 153 | """ |
| 154 | migrations_to_run = {m[0] for m in plan} |
| 155 | for migration, _ in full_plan: |
| 156 | if not migrations_to_run: |
| 157 | # We remove every migration that we applied from these sets so |
| 158 | # that we can bail out once the last migration has been applied |
| 159 | # and don't always run until the very end of the migration |
| 160 | # process. |
| 161 | break |
| 162 | if migration in migrations_to_run: |
| 163 | if "apps" not in state.__dict__: |
| 164 | if self.progress_callback: |
| 165 | self.progress_callback("render_start") |
| 166 | state.apps # Render all -- performance critical |
| 167 | if self.progress_callback: |
| 168 | self.progress_callback("render_success") |
| 169 | state = self.apply_migration( |
| 170 | state, migration, fake=fake, fake_initial=fake_initial |
| 171 | ) |
| 172 | migrations_to_run.remove(migration) |
| 173 | |
| 174 | return state |
| 175 | |
| 176 | def _migrate_all_backwards(self, plan, full_plan, fake): |
| 177 | """ |
no test coverage detected