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 :  /lib/python2.7/site-packages/south/management/commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/south/management/commands/migrate.pyc
�
�˔Qc@sdZddlmZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZddlmZddlmZd
efd��YZed�Zd�Zed�Zd�ZdS(s
Migrate management command.
i����(tprint_functionN(treduce(tmake_option(tBaseCommand(tsettings(t
import_module(t	migration(t
Migrations(tNoMigrations(tDEFAULT_DB_ALIAStCommandcBsEeZejeddddddedd�eddddd	dedd
�eddddddedd
�eddddddedd�eddddddedd�eddddddedd�eddddddedd�eddddddedd�eddddddedd�ed dddd!dedd"�ed#dd$dd%dedd&�ed'dd(dd)dedd*�fZd+gejD]Zej	�^q�kr
eed+dd(dd,dd-d.d/d0d1d-d2gdd3�f7Znd4Z
d5Zd7d7eeeeeeeeeed6�Z
RS(8s--alltactiont
store_truetdesttall_appstdefaultthelps)Run the specified migration for all apps.s--listt	show_lists3List migrations noting those that have been applieds	--changestshow_changessList changes for migrationss--skiptskips.Will skip over out-of-order missing migrationss--mergetmergesDWill run out-of-order missing migrations as they are - no rollbacks.s--no-initial-datatno_initial_datas(Skips loading initial data if specified.s--faketfakesAPretends to do the migrations, but doesn't actually execute them.s--db-dry-runt
db_dry_runs�Doesn't execute the SQL generated by the db methods, and doesn't store a record that the migration(s) occurred. Useful to test migrations before applying them.s--delete-ghost-migrationst
delete_ghostssTTells South to delete any 'ghost' migrations (ones in the database but not on disk).s--ignore-ghost-migrationst
ignore_ghostssyTells South to ignore any 'ghost' migrations (ones in the database but not on disk) and continue to apply new migrations.s	--noinputtstore_falsetinteractives:Tells Django to NOT prompt the user for input of any kind.s
--databasetstoretdatabasesHNominates a database to synchronize. Defaults to the "default" database.s--verbosityt	verbosityt1ttypetchoicetchoicest0t2s@Verbosity level; 0=minimal output, 1=normal output, 2=all outputsRuns migrations for all apps.s�[appname] [migrationname|zero] [--all] [--list] [--skip] [--merge] [--no-initial-data] [--fake] [--db-dry-run] [--database=dbalias]c
Ks�xgtjD]\}ytd|�Wq
tk
re}|jd}|jd�s\d|krf�qfq
Xq
W|
jdt�r�|}d}n|r�yt	|�g}Wq�t
k
r�td|�td|j�dSXntt
j��}|r|rt||
|
�n|	r%|r%t|�n|p.|	s�x�|D]�}t
j|d|d	|d
|dt|
jdd��d|
jdt�d
|
jdt�d|d|d|
d|d|�}|tkr8tjd�q8q8WndS(Ns.managementisNo module namedt
managementRs/The app '%s' does not appear to use migrations.s./manage.py migrate ttarget_nameRRRRtload_initial_dataRRRRRRi(RtINSTALLED_APPSRtImportErrortargst
startswithtgettFalsetNoneRRtprinttlistRtall_migrationstlist_migrationstshow_migration_changestmigrate_apptinttTruetsystexit(tselftappttargetRRt	backwardsRRRRRRRtoptionstapp_nametexctmsgtappstresult((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pythandle9sN
	


	N(t__name__t
__module__Rtoption_listRR-R6R	topttget_opt_stringRR*R.RC(((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyR
sB(c
Ks.ddlm}|jjdg|D]}|j�^q#�}|tkr\|j|�}ntd�|D��}t�x�|D]�}td|j��x�|D]z}|j�d|j	�}||kr�||}	tt
|j	�d|	j|��q�tt
|j	�dt|��q�Wt�q�WdS(	s�
    Prints a list of all available migrations, and which ones are currently applied.
    Accepts a list of Migrations instances.
    i����(tMigrationHistorytapp_name__incss+|]!}d|j|jf|fVqdS(s%s.%sN(R>R(t.0tmi((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pys	<genexpr>~st t.tappliedN(
tsouth.modelsRItobjectstfiltert	app_labelR	tusingtdictR/tnametformat_migration_list_itemROR-(
RARR=RIR:tapplied_migrationstapplied_migrations_lookupRt	full_nametapplied_migration((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyR2us.


%#cCsKxD|D]<}t|j��g|D]}|^q$}tt|�qWdS(s�
    Prints a list of all available migrations, and which ones are currently applied.
    Accepts a list of Migrations instances.
    
    Much simpler, less clear, and much less robust version:
        grep "ing " migrations/*.py
    N(R/RSRtdiff_migrations(RAR:Rt
migrations((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyR3�s
cKsF|r:t|jd��dkr/d||fSd|Snd|SdS(NRis  (*) %-80s  (applied %s)s  (*) %ss  ( ) %s(R5R,(RVROR=((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyRW�s
c	s�d���fd�}td|j��|j�j}|j�j}x@|j�D]2}||j�krWtd�||��qWqWWx@|j�D]2}||j�kr�td�||��q�q�Wx�|D]�}||kr�x?||D]3}|||kr�td||||��q�q�Wx?||D]3}|||kr6td||||��q6q6Wx-||D]}|||krx||||�}|||}|||}	t|�t|	�kr�td|||	f�q�t|t�rq�|||\}
}}|||\}
}}|
|
krTtd	||
|
f�n|gkrwtd
||f�n|gkr�td
||f�n||kr�td|||f�nx8|D]0}||kr�td||||f�q�q�Wx8|D]0}||krtd
||||f�qqWx]|D]R}||kr=||}||}||kr�td||||f�q�q=q=WqxqxWq�q�W|S(NcSs ||jdi�jd|�S(NtMetatobject_name(R,(tmodelstmodel((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyt
model_name�scsd�||�|fS(Ns%s.%s((R`Ratfield(Rb(sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyt
field_name�ss  s    added model %ss    removed model %ss    added field %ss    removed field %ss$    type of %s changed from %s to %ss!    %s type changed from %s to %ss    %s list %s is not []s!    %s list changed from %s to %ss    added %s attribute %s=%ss    removed attribute %s(%s=%s)s)    %s attribute %s changed from %s to %s(R/RVtmigration_classR`tkeysR t
isinstanceRU(t
migration1t
migration2Rdtmodels1tmodels2RaRcRVtfield_value1tfield_value2ttype1t
attr_list1tfield_attrs1ttype2t
attr_list2tfield_attrs2tattrtvalue1tvalue2((RbsE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyR\�sv	
!!




,(t__doc__t
__future__Rtos.pathtostreR7t	functoolsRtoptparseRtdjango.core.management.baseRtdjango.confRtdjango.utils.importlibRtsouthRtsouth.migrationRtsouth.exceptionsRtsouth.dbR	R
R2R3R6RWR\(((sE/usr/lib/python2.7/site-packages/south/management/commands/migrate.pyt<module>s $a		

https://t.me/AnonymousX5 - 2025