관리-도구
편집 파일: compare.cpython-37.pyc
B �M!V|o � @ s� d dl mZmZ d dlmZ d dl mZ ddlm Z d dl Z ddlmZ ddlm Z dd lmZ d d lmZ d dlZddlmZ d dlZd d lmZ e �e�Zdd� Zejdd�Zdd� Ze�d�dd� �Zdd� Z dd� Z!dd� Z"dd� Z#ej$dd � �Z%G d!d"� d"e&�Z'G d#d$� d$e'�Z(G d%d&� d&e'�Z)G d'd(� d(e'�Z*e�d)�d*d+� �Z+e�d,�d-d.� �Z,e�d,�d/d0� �Z-d1d2� Z.e�d,�d3d4� �Z/e�d)�d5d6� �Z0dS )7� )�schema�types)� Inspector)�event� )�opsN)�util)�compat)�sqla_compat)� OrderedSet� )�_user_defined_render)�_fk_specc C s, |j d }|jd }t| |� |�|� d S )N���)Zupgrade_ops_listZdowngrade_ops_list�_produce_net_changesZreverse_into)�autogen_contextZmigration_script�upgrade_opsZ downgrade_ops� r �M/opt/alt/python37/lib/python3.7/site-packages/alembic/autogenerate/compare.py�_populate_migration_script s r T)Zuselistc C sx | j }| j�dd�}t�|�}|jj}|rVt|�� �}|� d� |� d � |� |� nd g}t�d| jj �| ||� d S )N�include_schemasFZinformation_schemar )� connection�opts�getr Zfrom_engine�dialect�default_schema_name�setZget_schema_names�discard�add�comparators�dispatch�name)r r r r � inspector�default_schema�schemasr r r r s r r c C s� | j }| j}t� }| jj}| jj}xN|D ]F}t|j|d��} ||krT| �| jjg�} |�t |gt | � | �� q(W tdd� |jD ���||fg�} t || |||| � d S )N)r c S s g | ]}|j |jf�qS r )r r! )�.0�tabler r r � <listcomp>I s z'_autogen_for_tables.<locals>.<listcomp>)r"