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/schemamigration.pyc
�
K�pRc@sldZddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
yeWn!ek
r�ddl
mZnXddlmZddlmZddlmZdd	lmZdd
lmZddlmZmZddlmZdd
lmZddl m!Z!m"Z"m#Z#ddl$m%Z&de&fd��YZ%dZ'dS(s$
Startmigration command, version 2.
i����(tprint_functionN(tmake_option(tSet(tBaseCommand(tno_style(tImproperlyConfigured(tmodels(tsettings(t
Migrationstmigrate_app(tMigrationHistory(tNoMigrations(tchangestactionstfreezer(tCommandRcBs>eZejeddddddddd�ed	dddd
dddd�eddddd
dddd�eddddddedd�eddddddedd�eddddddedd�eddddddedd�fZdZdZd#dd#d#d#eeed#d eed!�Z	d"�Z
RS($s--add-modeltactiontappendtdesttadded_model_listttypetstringthelps�Generate a Create Table migration for the specified model.  Add multiple models to this migration with subsequent --add-model parameters.s--add-fieldtadded_field_lists�Generate an Add Column migration for the specified modelname.fieldname - you can use this multiple times to add more than one column.s--add-indextadded_index_lists�Generate an Add Index migration for the specified modelname.fieldname - you can use this multiple times to add more than one column.s	--initialt
store_truetinitialtdefaults(Generate the initial schema for the app.s--autotautosDAttempt to automatically detect differences from the last migration.s--emptytemptysMake a blank migration.s--updatetupdatesqUpdate the most recent migration instead of creating a new one. Rollback this migration if it is already applied.s9Creates a new template schema migration for the given apps�Usage: ./manage.py schemamigration appname migrationname [--empty] [--initial] [--auto] [--add-model ModelName] [--add-field ModelName.field_name] [--stdout]tic
 s:|p	g}|pg}|	p!g}	|p-g}|r?d}ntjd|�rm|dkrm|jd�n|r�|s�|s�|r�|jd|j�n|r�|s�|s�|r�|jd|j�n|s�|jd|j�n|jd�d}ytj|�}Wn tk
r0td	|�dSXt	|d
t
dt|
�dk��|r`y�|rmd
nd}Wntk
r�|jd�nX�j
�t|j�dg�kr�|jd�j
��nt�fd�|j�jj�D��}t�fd�tj�j
�g�j�D��}tjd�d|d|j�d|�}nt|rxtj��}n\|s�|s�|	r�tj�|||	�}n/|r�d}n tddtj�tjd�|r��r�|jd�n|sT|r|j�}n|r4tjdd�dj��}n|sT|jd|j�qTng}g}|r�x�|j �D]�\}}ytt!|�}Wn!t"k
r�t#d|��qsX||�}|j$|�|j%|�t|j&�dtj�qsWn|r|r|jd�n|j'�|�}|j(�id j)|pId!g�d"6d j)|pbd!g�d#6tj*|�d$6|r�d%d&j)t+t,|��p�dd6}|r{�d}t-j.j/d't0d(|d)|j��rtd*|j�dtj�t1�d+d,|
�nxXd5D]P}d/t2j3j)�j4�|j5�|f}t2j3j6|�rt2j7|�qqW�j8|�n�j9|�}|dkr�t|�n�t:t2j3j)�j4�|�d0�}|j;|�|j<�|r�d1nd2}|rtd3||fdtj�n td4|||fdtj�dS(6Nt-s[^_\w]sLMigration names should contain only alphanumeric characters and underscores.s4You cannot use --initial and other options together
s1You cannot use --auto and other options together
s3You must provide an app to create a migration for.
t.i����s.There is no enabled application matching '%s'.tforce_creationtverbose_creationii����sBYou cannot use --auto on an app with no migrations. Try --initial.t
complete_appss�You cannot use automatic detection, since the previous migration does not have this whole app frozen.
Either make migrations using '--freeze %s' or set 'SOUTH_AUTO_FREEZE_APP = True' in your settings.py.c3s@|]6\}}|jd�d�j�kr||fVqdS(R!iN(tsplitt	app_label(t.0tktv(t
migrations(sM/usr/lib/python2.7/site-packages/south/management/commands/schemamigration.pys	<genexpr>es	c3s@|]6\}}|jd�d�j�kr||fVqdS(R!iN(R%R&(R'R(R)(R*(sM/usr/lib/python2.7/site-packages/south/management/commands/schemamigration.pys	<genexpr>is	R*told_defstold_ormtnew_defss_You have not passed any of --initial, --auto, --empty, --add-model, --add-field or --add-index.tfileis5You cannot use --update on an app with no migrations.s^\d{4}_Rs+You must provide a name for this migration
s#Invalid action name from source: %ssNothing seems to have changed.s
s        passtforwardst	backwardst
frozen_modelsscomplete_apps = [%s]s, tapplied__isnulltapp_namet	migrationsGMigration to be updated, %s, is already applied, rolling it back now...s	current-1t	verbositytpytpycs%s.%stwtUpdatedtCreatedsL%s %s. You must now edit this migration and add the code for each direction.sD%s %s. You can now apply this migration with: ./manage.py migrate %s(spyR7(=tretsearchterrort	usage_strR%Rtget_appRtprintRtTruetintt
IndexErrorR&tgetattrtmigration_classtdicttitemsRtfreeze_appsRtAutoChangestormtInitialChangest
ManualChangestNonetsyststderrtexittsuggest_nametsubtnametget_changesR
tAttributeErrort
ValueErrortadd_forwardst
add_backwardstconsole_linetcalc_frozen_appstget_migration_templatetjointfreeze_apps_to_stringtmaptreprR
tobjectstfiltertFalseR	tostpathtmigrations_dirtfilenametisfiletunlinktremovet
next_filenametopentwritetclose( tselftappRSRRtfreeze_listRRtstdoutRR5RRtoptionst
app_moduletlast_migrationR+R-t
change_sourcetforwards_actionstbackwards_actionstaction_nametparamstaction_classRtapps_to_freezet
file_contentstexttold_filenametnew_filenametfptverb((R*sM/usr/lib/python2.7/site-packages/south/management/commands/schemamigration.pythandle4s�	
$
$(1		

"


 
-
'
(
$

 cCstS(N(tMIGRATION_TEMPLATE(Rn((sM/usr/lib/python2.7/site-packages/south/management/commands/schemamigration.pyR[�sN(t__name__t
__module__tDataCommandtoption_listRRbRR>RMR�R[(((sM/usr/lib/python2.7/site-packages/south/management/commands/schemamigration.pyR s&
-�sW# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models


class Migration(SchemaMigration):

    def forwards(self, orm):
%(forwards)s

    def backwards(self, orm):
%(backwards)s

    models = %(frozen_models)s

    %(complete_apps)s((t__doc__t
__future__RRNRcR;RtrandomtinspecttoptparseRtsett	NameErrortsetsRtdjango.core.management.baseRtdjango.core.management.colorRtdjango.core.exceptionsRt	django.dbRtdjango.confRtsouth.migrationRR	tsouth.modelsR
tsouth.exceptionsRt
south.creatorRR
Rt'south.management.commands.datamigrationRR�R�(((sM/usr/lib/python2.7/site-packages/south/management/commands/schemamigration.pyt<module>s0
�

https://t.me/AnonymousX5 - 2025