관리-도구
편집 파일: requirements.cpython-38.pyc
U 0?�f � @ sD d dl mZ d dlmZ d dlmZ ddlmZ G dd� de�ZdS ) � )�Requirements)�util)�sqla_compat� )� exclusionsc @ s� e Zd Zedd� �Zedd� �Zedd� �Zedd� �Zed d � �Zedd� �Z ed d� �Z edd� �Zedd� �Zedd� �Z edd� �Zedd� �Zedd� �Zedd� �Zedd� �Zedd � �Zed!d"� �Zed#d$� �Zed%d&� �Zed'd(� �Zed)d*� �Zed+d,� �Zed-d.� �Zed/d0� �Zed1d2� �Zed3d4� �Zed5d6� �Zed7d8� �Zed9d:� �Z ed;d<� �Z!ed=d>� �Z"ed?d@� �Z#edAdB� �Z$edCdD� �Z%edEdF� �Z&edGdH� �Z'edIdJ� �Z(dKS )L�SuiteRequirementsc C s t �� S )zXTarget database must support external schemas, and have one named 'test_schema'.�r �open��self� r �J/opt/hc_python/lib/python3.8/site-packages/alembic/testing/requirements.py�schemas s zSuiteRequirements.schemasc C s t �� S )z;target database should support 'AUTOCOMMIT' isolation level�r �closedr r r r �autocommit_isolation s z&SuiteRequirements.autocommit_isolationc C s t �� S )zneeded for sqlalchemy compatr r r r r �materialized_views s z$SuiteRequirements.materialized_viewsc C s dd� }t �|�S )Nc S sf ddl m} || j�}z|�d� W n< tk r: Y dS tk rN Y dS tk r` Y nX dS )Nr )�inspect�xTF)Z sqlalchemyr �dbZget_unique_constraints�NotImplementedError� TypeError� Exception)�configr Zinspr r r � doesnt_have_check_uq_constraints s zXSuiteRequirements.unique_constraint_reflection.<locals>.doesnt_have_check_uq_constraints�r Zskip_if)r r r r r �unique_constraint_reflection s z.SuiteRequirements.unique_constraint_reflectionc C s t �dd� gd�S )z'Target database must support SEQUENCEs.c S s | j jjS �N)r �dialectZsupports_sequences�r r r r �<lambda>2 � z-SuiteRequirements.sequences.<locals>.<lambda>zno sequence support�r �only_ifr r r r � sequences- s �zSuiteRequirements.sequencesc C s t �� S r r r r r r �foreign_key_match6 s z#SuiteRequirements.foreign_key_matchc C s t �� S r r r r r r �!foreign_key_constraint_reflection: s z3SuiteRequirements.foreign_key_constraint_reflectionc C s t �� S )zMTarget database must support check constraints and also enforce them.r r r r r �check_constraints_w_enforcement>