https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/core/management/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/core/management/sql.pyc
�
r�\c@s�ddlmZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZd�Zd	�Zeeed
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�ZdS(i����(tunicode_literalsN(tsettings(tCommandError(tmodels(t
get_models(tupathcCs�|jddkr*tddd��ntj|dt�}g}|jj�}tg|jj|�D]}||krj|^qj�}i}x�|D]�}|j	j
|||�\}	}
|j|	�xa|
j�D]S\}}|j
|g�j|�||kr�|j|j	j|||��q�q�W|j|j	j|||��|j|�q�Wt|j��}
|
r�g}xD|
D]<}|jg|j	j|||�D]}d|^q��q�W|r�|jd�|j|�q�n|S(	uDReturns a list of the CREATE TABLE SQL statements for the given app.uENGINEudjango.db.backends.dummyuADjango doesn't know which syntax to use for your SQL statements,
uLbecause you haven't properly specified the ENGINE setting for the database.
uBsee: https://docs.djangoproject.com/en/dev/ref/settings/#databasestinclude_auto_createdu-- uN-- The following references should be added but depend on non-existent tables:(t
settings_dictRRRtTruet
introspectionttable_namestsettinstalled_modelstcreationtsql_create_modeltextendtitemst
setdefaulttsql_for_pending_referencestaddtkeystappend(tapptstylet
connectiont
app_modelstfinal_outputttablestmodeltknown_modelstpending_referencestoutputt
referencestreftotrefstnot_installed_modelst	alter_sqltsql((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pyt
sql_creates8
7

&
	1
cCs�y|j�}Wn
d}nX|r;|jj|�}ng}g}t�}i}tj|dt�}x�|D]�}	|rr|jj|	j	j
�|krr|	j	}
xT|
jD]I}|jr�|jj
|kr�|j|jj
g�j|	|f�q�q�W|j|	�qrqrWxN|D]F}	|jj|	j	j
�|kr|j|jj|	||��qqW|r~|j�|j�n|ddd�S(uBReturns a list of the DROP TABLE SQL statements for the given app.RNi����(tcursortNoneR	R
RRRRttable_name_convertert_metatdb_tabletlocal_fieldstrelttoRRRRR
tsql_destroy_modeltclose(RRRR'R
Rt	to_deletetreferences_to_deleteRRtoptstf((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pyt
sql_delete<s2
	
$	,
&

cCsg|r|jjdt�}n|jj�}|rB|jj�nd}|jj||||�}|S(u�
    Returns a list of the SQL statements used to flush the database.

    If only_django is True, then only table names that have associated Django
    models and are in INSTALLED_APPS will be included.
    t
only_existing((R	tdjango_table_namesRR
t
sequence_listtopst	sql_flush(RRtonly_djangotreset_sequencest
allow_cascadeRtseqst
statements((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pyR:iscCs@g}t|�}x'|D]}|jt|||��qW|S(uNReturns a list of the custom table modifying SQL statements for the given app.(RRtcustom_sql_for_model(RRRRRR((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pyt
sql_customys

cCsFg}x9tj|dt�D]"}|j|jj||��qW|S(uRReturns a list of the CREATE INDEX SQL statements for all models in the given app.R(RRRRR
tsql_indexes_for_model(RRRRR((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pytsql_indexes�s cCsFg}x9tj|dt�D]"}|j|jj||��qW|S(uPReturns a list of the DROP INDEX SQL statements for all models in the given app.R(RRRRR
tsql_destroy_indexes_for_model(RRRRR((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pytsql_destroy_indexes�s cCs0t|||�t|||�t|||�S(udReturns a list of CREATE TABLE SQL, initial-data inserts, and CREATE INDEX SQL for the given module.(R&RARC(RRR((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pytsql_all�scCs�tjd�}g}g}xv|jd�D]e}|jd|�j�}|sUq+n|j|�|jd�r+|jdj|��g}q+q+W|S(Nu^((?:'[^']*'|[^'])*?)--.*$u
u\1u;u (tretcompiletsplittsubtstripRtendswithtjoin(tcontentt
comment_reR?t	statementtlinetcleaned_line((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pyt_split_statements�s

cCsz|j}tjjtjjtjjttj|jj	�j
��d��}g}|jr�g|jD]}t
|d�rg|^qg}x0|D]%}|j|j||jj��q�Wn|jdjd�d}tjj|d|j|f�tjj|d|j�g}	x`|	D]X}
tjj|
�rtj|
dd	tj�� }|jt|j���WdQXqqW|S(
Nusqlupost_create_sqluENGINEu.i����u	%s.%s.sqlu%s.sqluUtencoding(R*tostpathtnormpathRMtdirnameRRtget_appt	app_labelt__file__tmanagedR,thasattrRtpost_create_sqlR+RRIt
model_nametexiststcodecstopenRtFILE_CHARSETRStread(RRRR3tapp_dirRR4tpost_sql_fieldstbackend_namet	sql_filestsql_filetfp((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pyR@�s	E	+
&
&cCs}xvtj�D]h}|jjd�d}|dkrAd|GHntjjjd|d|d|d|d	|d
|�q
WdS(Nu.i����iu,Running pre-sync handlers for application %stsenderRt
create_modelst	verbositytinteractivetdb(Rtget_appst__name__RItsignalst
pre_syncdbtsend(RlRmRnRoRtapp_name((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pytemit_pre_sync_signal�scCs}xvtj�D]h}|jjd�d}|dkrAd|GHntjjjd|d|d|d|d	|d
|�q
WdS(Nu.i����iu-Running post-sync handlers for application %sRkRtcreated_modelsRmRnRo(RRpRqRIRrtpost_syncdbRt(RwRmRnRoRRu((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pytemit_post_sync_signal�s(t
__future__RRaRURGtdjango.confRtdjango.core.management.baseRt	django.dbRtdjango.db.modelsRtdjango.utils._osRR&R5tFalseRR:RARCRERFRSR@RvRy(((s</tmp/pip-install-XxeQeY/django/django/core/management/sql.pyt<module>s&	.	-							

https://t.me/AnonymousX5 - 2025