관리-도구
편집 파일: requirements.cpython-311.pyc
� �܋fD � �R � d dl mZ d dlmZ d dlmZ ddlmZ G d� de� � ZdS ) � )�Requirements)�util)�sqla_compat� )� exclusionsc �< � e Zd Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Z ed� � � Z ed� � � Zed � � � Zed � � � Z ed� � � Zed� � � Zed � � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Zed� � � Z ed� � � Z!ed� � � Z"ed � � � Z#ed!� � � Z$ed"� � � Z%ed#� � � Z&ed$� � � Z'ed%� � � Z(d&S )'�SuiteRequirementsc �( � t j � � S )zXTarget database must support external schemas, and have one named 'test_schema'.�r �open��selfs �m/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/alembic/testing/requirements.py�schemaszSuiteRequirements.schemas � � � �� � � � c �( � t j � � S )z;target database should support 'AUTOCOMMIT' isolation level�r �closedr s r �autocommit_isolationz&SuiteRequirements.autocommit_isolation s � � � �"�"�"r c �( � t j � � S )zneeded for sqlalchemy compatr r s r �materialized_viewsz$SuiteRequirements.materialized_views s � � � �"�"�"r c �0 � d� }t j |� � S )Nc � � ddl m} || j � � } |� d� � n(# t $ r Y dS t $ r Y dS t $ r Y nw xY wdS )Nr )�inspect�xTF)� sqlalchemyr �db�get_unique_constraints�NotImplementedError� TypeError� Exception)�configr �insps r � doesnt_have_check_uq_constraintszXSuiteRequirements.unique_constraint_reflection.<locals>.doesnt_have_check_uq_constraints s� � �*�*�*�*�*�*��7�6�9�%�%�D� ��+�+�C�0�0�0�0��&� � � ��t�t�� � � ��t�t�� � � ��� �����5s �. � A� A� A�A�r �skip_if)r r% s r �unique_constraint_reflectionz.SuiteRequirements.unique_constraint_reflection s% � � � � � �!�"B�C�C�Cr c �0 � t j d� gd� � S )z'Target database must support SEQUENCEs.c �$ � | j j j S �N)r �dialect�supports_sequences�r# s r �<lambda>z-SuiteRequirements.sequences.<locals>.<lambda>2 s � �F�I�-�@� r zno sequence support�r �only_ifr s r � sequenceszSuiteRequirements.sequences- s% � � �!� @� @�A�!� � � r c �( � t j � � S r+ r r s r �foreign_key_matchz#SuiteRequirements.foreign_key_match6 � � ��� � � r c �( � t j � � S r+ r r s r �!foreign_key_constraint_reflectionz3SuiteRequirements.foreign_key_constraint_reflection: r5 r c �( � t j � � S )zMTarget database must support check constraints and also enforce them.r r s r �check_constraints_w_enforcementz1SuiteRequirements.check_constraints_w_enforcement>