File: //lib/python3/dist-packages/django/db/migrations/__pycache__/executor.cpython-310.pyc
o
3�a�E � @ s^ d dl mZ d dlmZmZ ddlmZ ddlm Z ddl
mZ ddlm
Z
G dd � d �Zd
S )� )�apps)�
migrations�router� )�InvalidMigrationPlan)�MigrationLoader)�MigrationRecorder)�ProjectStatec @ st e Zd ZdZddd�Zddd�Zddd �Zdd
d�Zdd
� Zdd� Z ddd�Z
dd� Zddd�Zdd� Z
dd� ZdS )�MigrationExecutorzu
End-to-end migration execution - load migrations and run them up or down
to a specified set of targets.
Nc C s( || _ t| j �| _t| j �| _|| _d S �N)�
connectionr �loaderr �recorder�progress_callback)�selfr r � r �?/usr/lib/python3/dist-packages/django/db/migrations/executor.py�__init__ s
zMigrationExecutor.__init__Fc sP g }|ri }nt | jj�}|D ]�� � d du rH| jj�� D ])}|d � d krF| jj�|�D ]}||v rE|�| jjj| df� |�|� q.qq� |v r�t � fdd�| jjj
� jD ��}|D ]!}| jj�|�D ]}||v r|�| jjj| df� |�|� qhq_q| jj�� �D ]}||vr�|�| jjj| df� | jjj| ||<