HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/alembic/ddl/__pycache__/sqlite.cpython-37.opt-1.pyc
B

�M!V�
�@s4ddlmZddlmZddlZGdd�de�ZdS)�)�util�)�DefaultImpl�Nc@s<eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
S)�
SQLiteImplZsqliteFcCs(x"|jD]}|ddkrdSqWdSdS)z�Return True if the given :class:`.BatchOperationsImpl`
        would need the table to be recreated and copied in order to
        proceed.

        Normally, only returns True on SQLite when operations other
        than add_column are present.

        r)Z
add_columnZcreate_indexZ
drop_indexTFN)Zbatch)�selfZbatch_op�op�r	�C/opt/alt/python37/lib/python3.7/site-packages/alembic/ddl/sqlite.py�requires_recreate_in_batchs	z%SQLiteImpl.requires_recreate_in_batchcCs,|jdkrtd��n|�|�r(t�d�dS)Nz5No support for ALTER of constraints in SQLite dialectz>Skipping unsupported ALTER for creation of implicit constraint)�_create_rule�NotImplementedErrorr�warn)r�constr	r	r
�add_constraints


zSQLiteImpl.add_constraintcCs|jdkrtd��dS)Nz5No support for ALTER of constraints in SQLite dialect)rr
)rrr	r	r
�drop_constraint's
zSQLiteImpl.drop_constraintcCs4|dk	rt�dd|�}|dk	r,t�dd|�}||kS)Nz	^\"'|\"'$�)�re�sub)rZinspector_columnZmetadata_columnZrendered_metadata_defaultZrendered_inspector_defaultr	r	r
�compare_server_default,s

z!SQLiteImpl.compare_server_defaultcs^tjr
dSdd��t�fdd�|D��}x0t|�D]$}|jdkr2�|�|kr2|�|�q2WdS)NcSstt|j����S)N)�tuple�sorted�columns�keys)�uqr	r	r
�uq_sigFsz:SQLiteImpl.correct_for_autogen_constraints.<locals>.uq_sigc3s|]}�|�VqdS)Nr	)�.0r)rr	r
�	<genexpr>Jsz=SQLiteImpl.correct_for_autogen_constraints.<locals>.<genexpr>)rZsqla_100�set�list�name�remove)rZconn_unique_constraintsZconn_indexesZmetadata_unique_constraintsZmetadata_indexesZconn_unique_sigs�idxr	)rr
�correct_for_autogen_constraints:s

z*SQLiteImpl.correct_for_autogen_constraintsN)
�__name__�
__module__�__qualname__Z__dialect__Ztransactional_ddlrrrrr#r	r	r	r
rs
r)rr�implrrrr	r	r	r
�<module>s