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 :  /proc/self/root/lib/python2.7/site-packages/south/migration/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/lib/python2.7/site-packages/south/migration/__init__.pyc
�
K�pRc
@s�dZddlmZddlZddlmZddlZddlmZddl	m
Z
ddlmZmZddl
mZmZmZmZmZdd	lmZmZdd
lmZddlmZddlmZmZd
�Zd�Zd�Zd�Zd�Z d�Z!e"e"d�Z#d�Z$d�Z%d�Z&d�Z'de"e"e"e"de"e"ee"e"e"d�Z)dS(s
Main migration logic.
i����(tprint_functionN(tImproperlyConfigured(t
exceptions(tMigrationHistory(tdbtDEFAULT_DB_ALIAS(t	BackwardstForwardstDryRunMigratortFakeMigratortLoadInitialDataMigrator(t	Migrationt
Migrations(t	SortedSet(tall_migrations(tpre_migratetpost_migratecCs#g|D]}||kr|^qS(N((tforwardstdonetm((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytto_applyscCs#g|D]}||kr|^qS(N((t	backwardsRR((s</usr/lib/python2.7/site-packages/south/migration/__init__.pyt
to_unapplysccsed}|st��nxF|D]>}||kr=|}qn|r||kr||fVqqWdS(N(tNonet
StopIteration(tpendingRtlastt	migration((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytproblemss
cCsttt|�|�||�S(s�
    Takes the list of linearised pending migrations, and the set of done ones,
    and returns the list of problems, if any.
    (tinner_problem_checkRtreversed(RRt	verbosity((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytforwards_problems)scCstt||�||�S(N(RR(RRR((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytbackwards_problems0sc	Cs�g}x�|D]�\}}tg�}t|j�}x�|r�|j�}||kr[q7n|j|�||kr�|r�td||f�n|j||f�q7|j|j�q7Wq
W|S(sFTakes a set of possible problems and gets the actual issues out of it.s? ! Migration %s should not have been applied before %s but was.(tsettlisttdependenciestpoptaddtprinttappendtextend(	RRRtresultRRtcheckedtto_checktchecking((s</usr/lib/python2.7/site-packages/south/migration/__init__.pyR3s 	
cCs�t�}g}xi|D]a}y|j�}|j�Wn1tjk
rY|j|�qtk
riqX|j|�qW|r�|r�x3|D]}|j�q�Wq�|s�tj	|��q�n|S(s:Checks that there's no 'ghost' migrations in the database.(
R
t
get_migrationRRtUnknownMigrationR(RR&tdeletetGhostMigrations(t	historiest
delete_ghostst
ignore_ghoststexiststghoststhR((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytcheck_migration_historiesKs$	


cCsYt}t}|dkr(|dj}n'|j}|j�}|rO|j}n||fS(Ni(R#Rtbackwards_plant
forwards_plantnext(ttargett
migrationsRRtmigration_before_here((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytget_dependenciesbs	cCs�t||�\}}d}|�}t||�}|sBd}	n't|||�}td|d|�}	|s�|�}t||�}
|
|kr�t||�}t|||�}td|d|�}	q�n|	||fS(NRtinteractive(R?RRR RRR!R(R<tappliedR=RR@RRRtworkplant	directiontmissing_backwards((s</usr/lib/python2.7/site-packages/south/migration/__init__.pyt
get_directionqs 			cCs\|s
|S|r(td|dt�}n0|r@td|�}n|rXtd|�}n|S(Ntmigratortignore_fail(RtFalseR	R
(RCt
db_dry_runtfaketload_initial_data((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytget_migrator�sccsng|D]}d|j|jf^q}x>|D]6}d|j�|j�f|k}|s0|Vq0q0WdS(Ns%s.%s(tapp_nameRt	app_labeltname(R=tapplied_migrationstmitapplied_migration_namesRt
is_applied((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytget_unapplied_migrations�s
)
"ic

Cs8|j�}
t|�}tjdd|
d|d|d|	�|sUtd|
�dStj�tj	j
dt�jd�j
|	�}|j
d|
�j
|	�}tjj|	tj_tj�|d	ktjj_|d
krS|j�d	kr7||j�d}|r+td|j|jf�n|j}q�|rJtd
�nd}nN|dkr�y%t||�j�}|j�}Wq�tk
r�d}q�Xnt||
|�}|j|�}|r|dkr|j�|krtd||j�f�ntd|
�nt|||||�\}}}|rZ|pD|rZtj|��nt||||�}|r�|j |�|j!|||	�}|r4t"jdd|
d|d|d|	�q4nl|r�td�n|rt#dt$d|��}|j%|d|	�nt"jdd|
d|d|d|	�dS(NtappRR@Rs?? You have no migrations for the '%s' app. You might want some.tapplied__isnullRARMis	current-1is$previous_migration: %s (applied: %s)sprevious_migration: zerotzeros	current+1s# - Soft matched migration %s to %s.sRunning migrations for %s:s- Nothing to migrate.RF(RWN(&RNtintRtsendRR'Rtcalculate_dependenciesRtobjectstfilterRHtorder_bytusingtsouthRtdbstinvalidate_all_modulestdebugtcountRRARTR;RORR8tguess_migrationRERtInconsistentMigrationHistoryRLtprint_titletmigrate_manyRR
RRK(R=ttarget_nametmergeRJRItyesRRKtskiptdatabaseR3R4R@RNtapplied_allRAtprevious_migrationtfirst_unapplied_migrationR<RCRRBRFtsuccess((s</usr/lib/python2.7/site-packages/south/migration/__init__.pytmigrate_app�sd%
'

	

	
+
(*t__doc__t
__future__Rtsystdjango.core.exceptionsRtsouth.dbR_Rtsouth.modelsRRRtsouth.migration.migratorsRRRR	R
tsouth.migration.baseRRtsouth.migration.utilsR
Rt
south.signalsRRRRRR R!RRHR8R?RERLRTRRq(((s</usr/lib/python2.7/site-packages/south/migration/__init__.pyt<module>s0(										

https://t.me/AnonymousX5 - 2025