Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/alembic/operations/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/alembic/operations/__pycache__/batch.cpython-311.pyc

�

�܋f5i��6�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm	Z	dd	l
mZdd
l
mZddl
m
Z
ddl
mZdd
l
mZddl
mZddl
mZddl
mZddl
mZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%ddlm&Z&dd lm'Z'dd!lm(Z(dd"lm)Z)dd#lm*Z*er0dd$lm+Z+dd%l,m-Z-dd&l.m/Z/dd'l.m0Z0dd(l1m2Z2dd)l3m4Z4dd*l5m6Z6dd+l7m8Z8Gd,�d-��Z9Gd.�d/��Z:d0S)1�)�annotations)�Any)�Dict)�List)�Optional)�Tuple)�
TYPE_CHECKING)�Union)�CheckConstraint)�Column)�ForeignKeyConstraint)�Index)�MetaData)�PrimaryKeyConstraint��schema)�Table)�types)�SchemaEventTarget)�OrderedDict)�topological�)�exc)�_columns_for_constraint)�_copy)�_copy_expression)�_ensure_scope_for_ddl)�_fk_is_self_referential)�_idx_table_bound_expressions)�_insert_inline)�_is_type_bound)�_remove_column_from_collection)�_resolve_for_variant)�_select)�constraint_name_defined)�constraint_name_string)�Literal)�Dialect)�ColumnClause)�quoted_name)�Function)�
Constraint)�
TypeEngine)�DefaultImplc��eZdZd�Zedd���Zedd���Zdd�Zd d
�Zd d�Z	d d�Z
d d
�Zd!d�Zd!d�Z
d�Zd"d�Zd"d�Zd�Zd�Zd�Zd�Zd�ZdS)#�BatchOperationsImplc	���||_||_||_|dvrtd���||_||_||_t|��|_||_	t|	��|_
|j
�dt|j
�
dd������|j
d�d|jjf��|
|_||_g|_dS)N)�auto�always�neverz4recreate may be one of 'auto', 'always', or 'never'.�	listeners��column_reflect)�
operations�
table_namer�
ValueError�recreate�	copy_from�
table_args�dict�table_kwargs�reflect_args�reflect_kwargs�
setdefault�list�get�append�impl�autogen_column_reflect�naming_convention�partial_reordering�batch)�selfr8r9rr;r<r=r?r@rArHrIs            �O/opt/cloudlinux/venv/lib64/python3.11/site-packages/alembic/operations/batch.py�__init__zBatchOperationsImpl.__init__5s��%���$�������6�6�6��F���
�!��
�"���$��� ��.�.���(���"�>�2�2�����&�&���d�1�5�5�k�2�F�F�G�G�	
�	
�	
�	
��K�(�/�/�
�z��E�F�	
�	
�	
�"3���"4�����
�
�
��returnr(c�$�|jjjS�N)r8rF�dialect�rKs rLrRzBatchOperationsImpl.dialectZs����#�+�+rNr.c��|jjSrQ)r8rFrSs rLrFzBatchOperationsImpl.impl^s
����#�#rN�boolc�t�|jdkr|jj�|��S|jdkrdSdS)Nr2r3TF)r;r8rF�requires_recreate_in_batchrSs rL�_should_recreatez$BatchOperationsImpl._should_recreatebs?���=�F�"�"��?�'�B�B�4�H�H�H�
�]�h�
&�
&��4��5rN�Nonec	�P�|���}t|jj��5|s2|jD](\}}}t|jj|��}||i|���)�n+|jrt|j���}nt��}|j	�
|j	}d}n�|jj
jr4tj
d|jj
jj�d|j�d����t#|j|g|j�R|j|j���d�|j��}d}t-|j||j|j||j���}	|jD]\}}}t|	|��}||i|���|	�|j��ddd��dS#1swxYwYdS)	N)rHFzEThis operation cannot proceed in --sql mode; batch mode with dialect zF requires a live database connection with which to reflect the table "z�". To generate a batch SQL migration script using table "move and copy", a complete Table object should be passed to the "copy_from" argument of the batch_alter_table() method so that table reflection can be skipped.)r�
autoload_withT)rI)rXrrF�
connectionrJ�getattrr8rHrr<�migration_context�as_sqlr�CommandErrorrR�namer9rr@r�get_bindrA�ApplyBatchImplr=r?rI�_create)
rK�should_recreate�opname�arg�kw�fn�m1�existing_table�	reflected�
batch_impls
          rL�flushzBatchOperationsImpl.flushjsQ���/�/�1�1��
"�4�9�#7�
8�
8�4	.�4	.�"�3
.�'+�z�#�#�O�F�C�� ���!5�v�>�>�B��B��N�r�N�N�N�N�#��)�$�!�D�4J�K�K�K�B�B�!���B��>�-�%)�^�N� %�I�I���8�?�
�!�.�
9�#��@�H�M�
9�
9�6:�_�	
9�
9�
9����&+����&�
�*�&�&� $�{�&*�o�&>�&>�&@�&@�	&�&��-�
&�&�N�!%�I�+��I�"��O��%��'+�'>�
���
�(,�z�#�#�O�F�C�� ��V�4�4�B��B��N�r�N�N�N�N��"�"�4�9�-�-�-�i4	.�4	.�4	.�4	.�4	.�4	.�4	.�4	.�4	.�4	.�4	.�4	.����4	.�4	.�4	.�4	.�4	.�4	.s�E F�F�"Fc�@�|j�d||f��dS)N�alter_column�rJrE�rKrgrhs   rLrpz BatchOperationsImpl.alter_column��%���
���>�3��3�4�4�4�4�4rNc��d|vsd|vr(|���stjd���|j�d||f��dS)N�
insert_before�insert_afterz^Can't specify insert_before or insert_after when using ALTER; please specify recreate='always'�
add_column)rXrr`rJrErrs   rLrwzBatchOperationsImpl.add_column�sj���r�!�!�^�r�%9�%9��'�'�)�)�&:��"�:���
�	
�
���<��b�1�2�2�2�2�2rNc�@�|j�d||f��dS)N�drop_columnrqrrs   rLryzBatchOperationsImpl.drop_column�s%���
���=�#�r�2�3�3�3�3�3rN�constr,c�B�|j�d|fif��dS)N�add_constraintrq�rKrzs  rLr|z"BatchOperationsImpl.add_constraint�s(���
���+�e�X�r�:�;�;�;�;�;rNc�B�|j�d|fif��dS)N�drop_constraintrqr}s  rLrz#BatchOperationsImpl.drop_constraint�s(���
���,�u�h��;�<�<�<�<�<rNc�@�|j�d||f��dS)N�rename_tablerqrrs   rLr�z BatchOperationsImpl.rename_table�rsrN�idxrc�B�|j�d|fif��dS)N�create_indexrq�rKr�s  rLr�z BatchOperationsImpl.create_index�s'���
���>�C�6�2�6�7�7�7�7�7rNc�B�|j�d|fif��dS)N�
drop_indexrqr�s  rLr�zBatchOperationsImpl.drop_index�s'���
���<�#���4�5�5�5�5�5rNc�B�|j�d|fif��dS)N�create_table_commentrq�rK�tables  rLr�z(BatchOperationsImpl.create_table_comment�s(���
���1�E�8�R�@�A�A�A�A�ArNc�B�|j�d|fif��dS)N�drop_table_commentrqr�s  rLr�z&BatchOperationsImpl.drop_table_comment�s(���
���/�%��2�>�?�?�?�?�?rNc� �td���)Nz Can't create table in batch mode��NotImplementedErrorr�s  rL�create_tablez BatchOperationsImpl.create_table�s��!�"D�E�E�ErNc� �td���)NzCan't drop table in batch moder�r�s  rL�
drop_tablezBatchOperationsImpl.drop_table�s��!�"B�C�C�CrNc�B�|j�d|fif��dS)N�create_column_commentrq�rK�columns  rLr�z)BatchOperationsImpl.create_column_comment�s(���
���2�V�I�r�B�C�C�C�C�CrNN)rOr()rOr.)rOrU�rOrY�rzr,rOrY�r�rrOrY)�__name__�
__module__�__qualname__rM�propertyrRrFrXrnrprwryr|rr�r�r�r�r�r�r�r�r6rNrLr0r04s�������#�#�#�J�,�,�,��X�,��$�$�$��X�$�����7.�7.�7.�7.�r5�5�5�5�3�3�3�3�4�4�4�4�<�<�<�<�=�=�=�=�5�5�5�8�8�8�8�6�6�6�6�B�B�B�@�@�@�F�F�F�D�D�D�D�D�D�D�DrNr0c���eZdZ	dFdGd�ZedHd���ZdId�ZdId�ZdId�ZdJd�Z	dKd�Z
dLd�Z						dMdNd0�ZdOd4�Z
		dPdQd7�ZdRd9�Zd:�Zd;�Zd<�ZdSd?�ZdSd@�ZdTdC�ZdTdD�ZdE�Zd S)Urcr6rFr.r�rr=�tupler?�Dict[str, Any]rlrUrIrOrYc�^�||_||_||_||_|�|j��|_d|_||_d|_	td�|jjD����|_t|j��|_||_|���dS)Nr6c3�,K�|]}|jd|ifV��dS��exprN)ra��.0�cs  rL�	<genexpr>z*ApplyBatchImpl.__init__.<locals>.<genexpr>�s>����,
�,
�&'�Q�V�f�a�[�!�,
�,
�,
�,
�,
�,
rN)rFr�r=r?�_calc_temp_namera�temp_table_name�	new_tablerI�add_col_orderingrr��column_transfersrC�existing_orderingrl�_grab_table_elements)rKrFr�r=r?rlrIs       rLrMzApplyBatchImpl.__init__�s�����	���
�$���(���#�3�3�E�J�?�?���*.���"4���
�	
��!,�,
�,
�+/�:�<�,
�,
�,
�!
�!
���"&�d�&;�!<�!<���"����!�!�#�#�#�#�#rN�	tablename�Union[quoted_name, str]�strc��d|zdd�S)Nz_alembic_tmp_%sr�2r6)�clsr�s  rLr�zApplyBatchImpl._calc_temp_name�s��!�I�-�q��t�4�4rNc�z�|jj}t��|_|jjD]Z}t||���}dx|_|_t|j	t��r|j	|j	usJ�||j|j<�[i|_g|_
i|_i|_i|_|jjD]t}t%|��r�|jrt|t(��r|js�6t+|j��r||j|j<�Z|j
�|���u|js1|jjD]$}|jD]}|jr||f|j|j<��%|jjD]}||j|j<�|jjD]-}|j�||jj|���.dS)NrF)r�rr�columnsr�r�unique�index�
isinstance�typerra�named_constraints�unnamed_constraints�col_named_constraints�indexes�new_indexes�constraintsr!rlrr&rE�kwargsr?rB)rKrr��c_copyrz�colr��ks        rLr�z#ApplyBatchImpl._grab_table_elements�s����"��/:�}�}������	*�	*�A��1�V�,�,�,�F�+0�0�F�M�F�L��!�&�"3�4�4�
1��{�!�&�0�0�0�0�#)�D�L��� � �8:���#%�� �%'��"�)+���-/����Z�+�	7�	7�E��e�$�$�
7����
7��u�o�6�6�
7��
�
7��'��
�3�3�
7�5:��&�u�z�2�2��(�/�/��6�6�6�6��~�	N��z�|�
N�
N�� �_�N�N�E��z�N�BE�u���2�5�:�>��N��:�%�	)�	)�C�%(�D�L���"�"���"�	B�	B�A���(�(��D�J�,=�a�,@�A�A�A�A�	B�	BrNc�z��t��}t�j��}�jrF�jD]=}t	|��D]+\}}|dkr |�||dz
|f���,�>n@t	�j��D]+\}}|dkr |�||dz
|f���,|��j��d�|D��}ttj
||d�����}t�fd�|D�����_t�fd�|D�����_dS)Nr�c�6�g|]}|d|dk�|��S)rr�r6)r��ps  rL�
<listcomp>zNApplyBatchImpl._adjust_self_columns_for_partial_reordering.<locals>.<listcomp>6s%��7�7�7�A�!�A�$�!�A�$�,�,�a�,�,�,rNT)�deterministic_orderc3�6�K�|]}|�j|fV��dSrQ)r��r�r�rKs  �rLr�zMApplyBatchImpl._adjust_self_columns_for_partial_reordering.<locals>.<genexpr>;s.�����"I�"I�A�A�t�|�A��#7�"I�"I�"I�"I�"I�"IrNc3�6�K�|]}|�j|fV��dSrQ)r�r�s  �rLr�zMApplyBatchImpl._adjust_self_columns_for_partial_reordering.<locals>.<genexpr><sA�����,
�,
�./�Q��%�a�(�)�,
�,
�,
�,
�,
�,
rN)
�setrCr�rI�	enumerate�addr��updater�r�sortrr�)rK�pairs�
col_by_idx�tuple_r��elem�
pairs_list�sorted_s`       rL�+_adjust_self_columns_for_partial_reorderingz:ApplyBatchImpl._adjust_self_columns_for_partial_reordering"s���������$�,�'�'�
��"�	=��1�
=�
=��#,�V�#4�#4�=�=�K�E�4��q�y�y��	�	�6�%�!�)�#4�d�";�<�<�<��=�
=�
 )��)?�@�@�
=�
=���t��1�9�9��I�I�z�%�!�)�4�d�;�<�<�<��
���T�*�+�+�+�
8�7��7�7�7�
����Z���N�N�N�
�
��#�"I�"I�"I�"I��"I�"I�"I�I�I��� +�,
�,
�,
�,
�3:�,
�,
�,
�!
�!
����rNc�d�|j�
Jd���t��}|jj}|js|jr|���t|j|gt|j
�����t|j��z�Rd|i|j
��x|_}t|j�����|jzD]�}d�t!|��D��}|�|j��s�6t'|t(��r9t+|��rt-|||j���}n$t-||���}nt-|||���}t'|t(��r|�||��|�|����dS)NzCan only create new table oncerc��h|]	}|j��
Sr6)�keyr�s  rL�	<setcomp>zAApplyBatchImpl._transfer_elements_to_new_table.<locals>.<setcomp>Us��K�K�K�q�Q�U�K�K�KrN)r�target_tabler)r�rr�rrIr�r�rr�rCr��valuesr=r?r�r�r�issubsetr�r�r
rr�_setup_referent�append_constraint)rK�mrr�rz�
const_columns�
const_copys       rL�_transfer_elements_to_new_tablez.ApplyBatchImpl._transfer_elements_to_new_table@s����~�%�%�'G�%�%�%��J�J����"���"�	?�d�&;�	?��<�<�>�>�>�%*�� �
�&
��4�<�&�&�(�(�)�)�D���,A�,A�A�&
�&
�&
��	&
�
��&
�&
�	
����
��'�.�.�0�0�1�1�D�4L�L� 	4� 	4�E�L�K�,C�E�,J�,J�K�K�K�M� �)�)�$�*?�@�@�
���%�!5�6�6�
�*�5�1�1�=�"'��f�4�:�"�"�"�J�J�"'�u�V�!<�!<�!<�J�J�"��&�y����
��%�!5�6�6�
/��$�$�Q��.�.�.��'�'�
�3�3�3�3�A 	4� 	4rN�List[Index]c	����j�J�g}�j���D]_}|jr�
t	|jg�fd�t
|��D���R|j�jd�|j��}|�	|���`�j
���D]Y}|�	t	|jg�fd�|j���D���Rd|ji|j�����Z|S)Nc�:��g|]}t|�j����Sr6)rr�)r�r�rKs  �rLr�zCApplyBatchImpl._gather_indexes_from_both_tables.<locals>.<listcomp>�s5�������%�T�4�>�:�:���rN)r��_tablec�4��g|]}�jj|��Sr6)r�r�)r�r�rKs  �rLr�zCApplyBatchImpl._gather_indexes_from_both_tables.<locals>.<listcomp>�s#���L�L�L��d�n�&�s�+�L�L�LrNr�)
r�r�r��_column_flagrrarr�r�rEr�r��keys)rKr��idx_existing�idx_copyr�s`    rL� _gather_indexes_from_both_tablesz/ApplyBatchImpl._gather_indexes_from_both_tablesssj����~�)�)�)��� �L�/�/�1�1�	!�	!�L��(�
����!�	����� <�\� J� J����	�	�#�*�
�~�	�	��%�	�	�H�
�J�J�x� � � � ��%�,�,�.�.�	�	�E��J�J���J��M�L�L�L�u�}�7I�7I�7K�7K�L�L�L���� �<���l�	��
�
�
�
��
rN�metadatar�
constraintr
c�X��|jd���}|�d��}|d}t|��dkr	|d}nd}||jkr�tj||��}dd��||jvrs|j|}|jD]\}	�|	���d��d}
|
|jvr-|�	t|
tj�����]dSt||gd	��fd
�|jD��D���Rd|i�dSdS)
Nr�.����r�rc�*�|���SrQ)�_get_colspec)r�s rL�colspecz/ApplyBatchImpl._setup_referent.<locals>.colspec�s���(�(�*�*�*rN���c�B�g|]}t|tj����Sr6)r�sqltypes�NULLTYPE)r��ns  rLr�z2ApplyBatchImpl._setup_referent.<locals>.<listcomp>�s5�������q�(�"3�4�4���rNc�X��g|]&}�|���d��d��'S)r�r�)�split)r�r�r�s  �rLr�z2ApplyBatchImpl._setup_referent.<locals>.<listcomp>�sD���"�"�"� $�$�G�D�M�M�/�/��4�4�R�8�"�"�"rNr)r�r)�elementsr�r�lenr��
sql_schema�_get_table_key�tablesr��
append_columnrr�r�r)rKr�r��spec�parts�tname�referent_schemar��tr��colnamer�s           @rLr�zApplyBatchImpl._setup_referent�s�����"�
�
�
�,�.�.�	
��
�
�3�����b�	���u�:�:��?�?�#�A�h�O�O�"�O��D�(�(�(��+�E�?�C�C�C�
+�
+�
+�
+��h�o�%�%��O�C�(��&�/�L�L�D�%�g�d�m�m�1�1�#�6�6�r�:�G��a�c�)�)�����w��8I�(J�(J�K�K�K��L�L�
������"�"�"�"�(2�(;�"�"�"�������+������)�(rN�op_implc
�z�|���|�||j��|j�J�|�|j��	|�t
|j���td�|j	�
��D����td�|j	���D�������|�
|j��|�|j|jj|jj���|jj|j_	|���D]}|�|���	|j|j_dS#|j|j_wxYw#|�
|j���xYw)Nc3�(K�|]
\}}d|v�	|V��dSr�r6)r�r��transfers   rLr�z)ApplyBatchImpl._create.<locals>.<genexpr>�s=������'�A�x�!�X�-�-��-�-�-�-��rNc�&�g|]}d|v�|d��S)r�r6)r�rs  rLr�z*ApplyBatchImpl._create.<locals>.<listcomp>�s2����� (�%��1�1�%�V�,�1�1�1rNr)r��prep_table_for_batchr�r�r��_execr �from_selectrCr��itemsr$r�r�r�r�rarr�r�)rKrr�s   rLrdzApplyBatchImpl._create�s����,�,�.�.�.��$�$�T�4�:�6�6�6��~�)�)�)����T�^�,�,�,�	;��M�M��t�~�.�.�:�:����+/�+@�+F�+F�+H�+H������
���,0�,A�,H�,H�,J�,J�����

�
�
�
�
� 
���t�z�*�*�*�

� � ��$�d�j�o�d�j�>O�
!�
�
�
�#'�*�/�D�N��
;��@�@�B�B�.�.�C��(�(��-�-�-�-�.�'+�&:���#�#�#��d�&:���#�:�:�:�:��	����t�~�.�.�.����s�B+F�,F�F�F:NFr9�column_name�nullable�Optional[bool]�server_default�)Optional[Union[Function[Any], str, bool]]ra�
Optional[str]�type_�Optional[TypeEngine]�
autoincrement�&Optional[Union[bool, Literal['auto']]]�comment�Union[str, Literal[False]]c	���|j|}
|j|}|��||kr�||
_||d<|	�dd��}|r\t	|	d|jj��}
t|
t��r'|
jr |j	�
|
jd��|�itj|��}t|
j
t��rdx|
j
_|
j
_|j�|
||��||
_
|�||
_|dur1|�d|
_n't'j|���|
��|�t-|��|
_|dur	||
_dSdS)Nra�
existing_typeF)r�r�rarDr#rFrRr�rr��popr��to_instancer��_create_events�create_constraint�cast_for_batch_migraterrr�
DefaultClause�_set_parentrUr r")rKr9rrrrarr r"rh�existing�existing_transferr%�resolved_existing_types              rLrpzApplyBatchImpl.alter_column�s����<��,��,0�,A�+�,N������ 3� 3�!�H�M�(,��f�%��F�F�?�D�9�9�M��

�)=���'���):�*�*�&��5�7H�I�I��.�3���*�.�.�.�3�����
���(��/�/�E��(�-�):�;�;�
����
�,��M�3�
�I�,�,��+�U�
�
�
�"�H�M��� (�H����&�&��%�*.��'�'��(�"����+������$�%)�-�%8�%8�H�"��%���&�H���� �rNrrurvc��|j}d�t|��D��}|js�|rG|sE||vr'||dz}|t|��kr||}nt	|j��|}|r7|s5||vr||dz
}|dkr||}nd�|jD��|}|r|xj||ffz
c_|r|xj||ffz
c_|js!|s!|s!|r!|xj|d|ffz
c_dSdSdSdSdS)Nc��i|]\}}||��	Sr6r6)r��iras   rL�
<dictcomp>zEApplyBatchImpl._setup_dependencies_for_add_column.<locals>.<dictcomp>6s��D�D�D�7�1�d�t�Q�D�D�DrNr�rc��i|]\}}||��	Sr6r6)r��a�bs   rLr3zEApplyBatchImpl._setup_dependencies_for_add_column.<locals>.<dictcomp>Ns+��(�(�(�%)�Q��A�q�(�(�(rNr�)r�r�rIrr>r�)rKrrurv�
index_cols�col_indexesr�s       rL�"_setup_dependencies_for_add_columnz1ApplyBatchImpl._setup_dependencies_for_add_column/s����+�
�D�D�i�
�.C�.C�D�D�D���&�	)��
�$�
�#�{�2�2�)�,�7�!�;����Z���0�0�,6�s�O�M��)-�T�-B�(C�(C�(�)�
��
)�#�
)�$��3�3�)�-�8�1�<���!�8�8�+5�c�?�L��(�(�-1�-B�(�(�(�'�()���	A��!�!�w�
�&>�%@�@�!�!��	@��!�!�|�W�&=�%?�?�!�!��'�	B�!�	B�!�	B��		B�
�!�!�z�"�~�w�&?�%A�A�!�!�!�!�
	B�	B�	B�	B�	B�	B�	B�	BrNr��Column[Any]c��|�|j||��t||jj���|j|j<i|j|j<dS)Nr)r9rarr�rr�r�)rKr9r�rurvrhs      rLrwzApplyBatchImpl.add_column_s\��	
�/�/��K���	
�	
�	
�
%*�&���9J�$K�$K�$K���V�[�!�-/���f�k�*�*�*rN�%Union[ColumnClause[Any], Column[Any]]c��|j|jjjvrt	|jjj|��|j|j=|j|j=|j�|j��d|vrPt|dt��r7|djr,|j
�|djd��dSdSdSdS)Nr%)rar��primary_keyr�r"r�r��remover�rr�r&)rKr9r�rhs    rLryzApplyBatchImpl.drop_columnos����;�$�*�0�8�8�8�*��
�&�.��
�
�
�
�L���%��!�&�+�.���%�%�f�k�2�2�2�
�r�!�!��2�o�.�0A�B�B�
"��?�#�(�
"�
�"�&�&��?�#�(�$�
�
�
�
�
�	
"�!�!�!�!�!rNc��dS)a^the batch table creation function will issue create_column_comment
        on the real "impl" as part of the create table process.

        That is, the Column object will have the comment on it already,
        so when it is received by add_column() it will be a normal part of
        the CREATE TABLE and doesn't need an extra step here.

        Nr6r�s  rLr�z$ApplyBatchImpl.create_column_comment�����rNc��dS)z�the batch table creation function will issue create_table_comment
        on the real "impl" as part of the create table process.

        Nr6r�s  rLr�z#ApplyBatchImpl.create_table_comment�rArNc��dS)z�the batch table creation function will issue drop_table_comment
        on the real "impl" as part of the create table process.

        Nr6r�s  rLr�z!ApplyBatchImpl.drop_table_comment�rArNrzr,c�l�t|j��std���t|tj��r7|jj|jvr$|j�	|jj��t|j��r||j|j<dS|j�|��dS)N�Constraint must have a name)
r%rar:r�rrr�r>r�r?r&r�rEr}s  rLr|zApplyBatchImpl.add_constraint�s���&�u�z�2�2�	<��:�;�;�;��e�Z�<�=�=�	H��z�%��)A�A�A��(�/�/��
�0F�G�G�G�!�%�*�-�-�	3�16�D�"�5�:�.�.�.��$�+�+�E�2�2�2�2�2rNc���|jstd���	|j|jvr�|j�|j��\}}t	|j|jj��D]<}|j|jkr*|j|jj�|���=nWt|j��r |j	�|j��}n#||j
vr|j
�|��t|t��r!|jD]}d|j|j_
�dSdS#t$r*t|��rYdStd|jz���wxYw)NrEFzNo such constraint: '%s')rar:r�r&rCr�r�r?r&r�r�r�rr>�KeyErrorr!)rKrzr��	col_consts    rLrzApplyBatchImpl.drop_constraint�s����z�	<��:�;�;�;�	?��z�T�7�7�7�!�7�;�;�E�J�G�G�
��U�!%�d�l�3�8�&<�&H�!I�!I�M�M�I� �~���3�3���S�X�.�:�A�A�)�L�L�L��M�(��
�3�3�
7��.�2�2�5�:�>�>����$�2�2�2��(�/�/��6�6�6��%�!5�6�6�
?� �=�?�?�C�9>�D�L���*�6�6�
?�
?�?�?���	F�	F�	F��e�$�$�
�
����7�%�*�D�E�E�E�	F���s�C)D;�;E/�E/r�rc�$�||j|j<dSrQ)r�rar�s  rLr�zApplyBatchImpl.create_index�s��%(�����"�"�"rNc�l�	|j|j=dS#t$rtd|jz���wxYw)NzNo such index: '%s')r�rarGr:r�s  rLr�zApplyBatchImpl.drop_index�sJ��	?���S�X�&�&�&���	?�	?�	?��2�S�X�=�>�>�>�	?���s�
�"3c� �td���)N�TODOr�rrs   rLr�zApplyBatchImpl.rename_table�s��!�&�)�)�)rN)r6)rFr.r�rr=r�r?r�rlrUrIr�rOrY)r�r�rOr�r�)rOr�)r�rr�r
rOrY)rr.rOrY)NFNNNF)r9r�rr�rrrrrarrrr r!r"r#rOrY)rr�rurrvrrOrY)NN)
r9r�r�r:rurrvrrOrY)r9r�r�r<rOrYr�r�)r�r�r�rM�classmethodr�r�r�r�r�r�rdrpr9rwryr�r�r�r|rr�r�r�r6rNrLrcrc�s�������%'�$�$�$�$�$�:�5�5�5��[�5�,B�,B�,B�,B�\
�
�
�
�<14�14�14�14�f����B%�%�%�%�N%;�%;�%;�%;�V$(�DI�"�&*�@D�.3�K'�K'�K'�K'�K'�Z.B�.B�.B�.B�h(,�&*�0�0�0�0�0� ����0���������
3�
3�
3�
3�?�?�?�?�8)�)�)�)�?�?�?�?�*�*�*�*�*rNrcN);�
__future__r�typingrrrrrr	r
�
sqlalchemyrrr
rrrrrrrr��sqlalchemy.eventsr�sqlalchemy.utilrr�utilr�util.sqla_compatrrrrrrr r!r"r#r$r%r&r'�sqlalchemy.enginer(�sqlalchemy.sql.elementsr)r*�sqlalchemy.sql.functionsr+�sqlalchemy.sql.schemar,�sqlalchemy.sql.type_apir-�ddl.implr.r0rcr6rNrL�<module>r[sv��"�"�"�"�"�"������������������������������� � � � � � �������&�&�&�&�&�&�������+�+�+�+�+�+�������������+�+�+�+�+�+�+�+�+�+�+�+�������(�(�(�(�(�(�/�/�/�/�/�/�'�'�'�'�'�'�'�'�'�'�'�'�������6�6�6�6�6�6�$�$�$�$�$�$�/�/�/�/�/�/�4�4�4�4�4�4�6�6�6�6�6�6�;�;�;�;�;�;�-�-�-�-�-�-�-�-�-�-�-�-�=�=�=�=�=�=�3�3�3�3�3�3�&�&�&�&�&�&�6�6�6�6�6�6�5�5�5�5�5�5��
'�������)�)�)�)�)�)�4�4�4�4�4�4�3�3�3�3�3�3�1�1�1�1�1�1�0�0�0�0�0�0�2�2�2�2�2�2�&�&�&�&�&�&�[D�[D�[D�[D�[D�[D�[D�[D�|}*�}*�}*�}*�}*�}*�}*�}*�}*�}*rN

Hacked By AnonymousFox1.0, Coded By AnonymousFox