+
    Tj.                         ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt ^ R	IHt ^ R
IHt ^ RIHt  ! R R4      t ! R R4      tRtRtR# )    N)import_module)get_version)apps)SettingsReference)
migrations)MigrationLoader)
Serializerserializer_factory)get_func_args)
module_dir)nowc                   H   a  ] tR t^t o R	R ltR tR tR tR tR t	Rt
V tR# )
OperationWriterc                ,    Wn         . V n        W n        R # N)	operationbuffindentation)selfr   r   s   &&&P/var/www/idalgo/venv/lib/python3.14/site-packages/django/db/migrations/writer.py__init__OperationWriter.__init__   s    "	&    c                .  a a
 V
V 3R  lp\        4       o
S P                  P                  4       w  r#p\        S P                  P                  4      p\        \        VR4      S P                  P                  8X  d   S P                  RV,          4       MmS
P                  RS P                  P                  P                  ,          4       S P                  S P                  P                  P                  : RV: R24       S P                  4        \        V4       F  w  rgTpWV,          p	V! W4       K  	  \        V4      pWVR  F  p	W9   g   K  WI,          pV! W4       K  	  S P                  4        S P                  R4       S P                  4       S
3# )c                   < V SP                   P                  9   Edt   \        V\        \        \
        34      '       EdR   \        V\
        4      '       EdJ   SP                  R V ,          4       SP                  4        VP                  4        F  w  r#\        P                  V4      w  rE\        P                  V4      w  rgVP                  4       p\        V4      ^8  d]   SP                  V: RV^ ,          : 24       V^R	  F  p	SP                  V	4       K  	  SP                  RVR	,          ,          4       MSP                  V: RV: R24       SP                  V4       SP                  V4       K  	  SP                  4        SP                  R4       R# SP                  RV ,          4       SP                  4        V F  p
\        P                  V
4      w  rgVP                  4       p\        V4      ^8  d>   VRR	  F  p	SP                  V	4       K  	  SP                  RVR	,          ,          4       MSP                  RV,          4       SP                  V4       K  	  SP                  4        SP                  R4       R# \        P                  V4      w  rgVP                  4       p\        V4      ^8  d]   SP                  V : RV^ ,          : 24       V^R	  F  p	SP                  V	4       K  	  SP                  RVR	,          ,          4       MSP                  V : RV: R24       SP                  V4       R# )
z%s={z: z%s,,z},z%s=[Nz],=)r   serialization_expand_args
isinstancelisttupledictfeedindentitemsMigrationWriter	serialize
splitlineslenupdateunindent)	_arg_name
_arg_valuekeyvalue
key_stringkey_imports
arg_stringarg_importsargsargitemimportsr   s   &&         r   _write)OperationWriter.serialize.<locals>._write   sq   DNNDDDT5$/J J j$//IIfy01KKM&0&6&6&8
2A2K2KC2P/
2A2K2KE2R/
)446t9q= II*d1g&FG'+Abz $		# (2 IIed2h&67 II:z&JK{3{3 '9 MMOIIdOIIfy01KKM *2A2K2KD2Q/
)446t9q='+CRy $		# (1 IIed2h&67 IIej&89{3 !+ MMOIIdO*9*C*CJ*O'
!,,.t9q=IIDG<=#Abz		#  *IIed2h./II)Z@A{+r   Nzmigrations.%s(z	import %s.(z),)setr   deconstructr   r   getattrr   	__class__r$   add
__module__r%   	enumerater*   r,   render)r   r9   namer5   kwargsoperation_argsir6   	arg_valuearg_namer8   s   f         @r   r(   OperationWriter.serialize   s3   /	,b %!^^779F&t~~'>'>?
 :tT*dnn.F.FFII&-.KKt~~'?'?'J'JKLII$..":":"E"EtLMoFAI%(H8' &
 I&r*H!",	x+ +
 			${{}g%%r   c                8    V ;P                   ^,          un         R#    Nr   r   s   &r   r%   OperationWriter.indenti       Ar   c                8    V ;P                   ^,          un         R# rM   rO   rP   s   &r   r,   OperationWriter.unindentl   rR   r   c                z    V P                   P                  R V P                  ^,          ,          V,           4       R# ) N)r   appendr   )r   lines   &&r   r$   OperationWriter.feedo   s)    		 0 01 45<=r   c                8    R P                  V P                  4      # )
)joinr   rP   s   &r   rD   OperationWriter.renderr   s    yy##r   )r   r   r   N)   )__name__rB   __qualname____firstlineno__r   r(   r%   r,   r$   rD   __static_attributes____classdictcell____classdict__s   @r   r   r      s*     '
O&b>$ $r   r   c                      a  ] tR t^vt o RtRR ltR t]R 4       t]R 4       t	]R 4       t
]R 4       t]R 4       t]R	 4       tR
tV tR# )r'   z^
Take a Migration instance and is able to produce the contents
of the migration file from it.
c                ,    Wn         W n        R V n        R# )FN)	migrationinclude_headerneeds_manual_porting)r   rh   ri   s   &&&r   r   MigrationWriter.__init__|   s    ",$)!r   c           	        RRRRRRRR/p\        4       p. pV P                  P                   F@  p\        V4      P	                  4       w  rVVP                  V4       VP                  V4       KB  	  V'       d   RP                  V4      R,           MRVR&   . pV P                  P                   Fq  pV^ ,          R8X  d3   VP                  R	V^,          ,          4       VP                  R
4       KC  VP                  RV P	                  V4      ^ ,          ,          4       Ks  	  V'       d"   RP                  \        V4      4      R,           MRVR&   \        4       p	\        V4       Fo  p
\        P                  ! RV
4      '       g   K"  V	P                  V
P                  R4      ^,          P                  4       4       VP!                  V
4       RV n        Kq  	  RV9   d$   VP%                  R4       VP                  R4       MVP                  R4       \        VR R7      pV'       d   RP                  V4      R,           MRVR&   V	'       d5   VR;;,          RRP                  \        V	4      4      ,          ,          uu&   V P                  P&                  '       d7   RV P	                  V P                  P&                  4      ^ ,          ,          VR&   V P                  P(                  '       d7   RV P	                  V P                  P(                  4      ^ ,          ,          VR&   V P*                  '       d5   \,        R\/        4       R\1        4       P3                  R4      /,          VR&   MRVR&   V P                  P4                  '       d   RVR&   V P                  P6                  '       g   RVR&   \8        V,          # ) z%Return a string of the file contents.replaces_str initial_strrun_before_str
atomic_strr[   
operations__setting__z5        migrations.swappable_dependency(settings.%s),z from django.conf import settingsz        %s,dependenciesz^import (.*)\.\d+[^\s]*$importTzfrom django.db import modelsz(from django.db import migrations, modelsz from django.db import migrationsc                 d    V P                  4       ^ ,          R8H  V P                  4       ^,          3# )r   from)split)rH   s   &r   <lambda>+MigrationWriter.as_string.<locals>.<lambda>   s"    AGGIaLF$:AGGIaL#Ir   )r/   r8   z

# Functions from the following migrations need manual copying.
# Move them and any dependencies into this file, then update the
# RunPython operations to refer to the local versions:
# %sz
# z
    replaces = %s
z
    run_before = %s
version	timestampz%Y-%m-%d %H:%Mmigration_headerz
    initial = True
z
    atomic = False
)r=   rh   rr   r   r(   r+   rW   r\   rt   rA   sortedr!   rematchrx   stripremoverj   discardreplaces
run_beforeri   MIGRATION_HEADER_TEMPLATEr   r   strftimeinitialatomicMIGRATION_TEMPLATE)r   r&   r8   rr   r   operation_stringoperation_importsrt   
dependencymigration_importsrX   sorted_importss   &           r   	as_stringMigrationWriter.as_string   s*    B2b"	
 % 
22I2A)2L2V2V2X/NN,-./ 3 ?Idii
3d:bl ..55J!}-##K m$ >?##MDNN:4Nq4Q$QR 6 7CDIIf\*+d2 	n  EMDxx3T::!%%djj&:1&=&C&C&EFt$,0)	 " *W4OO:;KKBCKK:;
  I
 @G499^4t;Bi)" F#456!7 7 >>"""'$..9P9P*QRS*TT .! >>$$$)DNN4>>;T;T,UVW,XX "# (A;=SU^^,<=E )E$%
 )+E$%>>!!!#;E- ~~$$$":E,!E))r   c                   \         P                  ! V P                  P                  4      w  rVf'   \	        RV P                  P                  ,          4      h \        V4      p \        V4      #   \         d     Mi ; i  \         d     Mi ; i\        P                  ! T P                  P                  4      pTP                  R4      w  pppTP                  T8X  d+   \        P                  P                  TP                  T4      # TP                  R4      . rT'       dt   TP!                  ^ TP#                  R4      4        \        RP                  T4      4      p	 \        T	4      p
M<  \         d     K_  i ; i  \        \        3 d     Kw  i ; i\	        RT,          4      h\        P                  P                  ! T
.TO5!  p\        P$                  ! TRR7       T Fr  p\        P                  P                  Y4      p
\'        \        P                  P                  T
R4      R4      ;_uu_ 4         R R R 4       K`    + '       g   i     Kq  ; i	  T# )	NztDjango can't create migrations for app '%s' because migrations have been disabled via the MIGRATION_MODULES setting.r;   zCould not locate an appropriate location to create migrations package %s. Make sure the toplevel package exists and can be imported.T)exist_okz__init__.pywr   )r   migrations_modulerh   	app_label
ValueErrorr   r   ImportErrorr   get_app_config
rpartitionrE   ospathr\   rx   insertpopmakedirsopen)r   migrations_package_name_r   
app_configmaybe_app_namemigrations_package_basenameexisting_dirsmissing_dirsbase_modulebase_dir	final_dirmissing_dirs   &            r   basedirMigrationWriter.basedir   s   %4%F%FNN$$&
" #*!^^556 	 -.E F!"344   		 (()A)AB

 $..s3		
'??n,77<<
1LMM '>&C&CC&H"|=#4#4R#89
+CHH],CD)+6H  "   ,  68OP  GGLL9L9	
I-'Kww||H:Hbggll8];SAA BAAA (
 sT   B  $
A/ /A=<A= BBF  "E. .E=<E= FF:IIc                <    R V P                   P                  ,          # )z%s.py)rh   rE   rP   s   &r   filenameMigrationWriter.filename  s    ,,,,r   c                j    \         P                  P                  V P                  V P                  4      # r   )r   r   r\   r   r   rP   s   &r   r   MigrationWriter.path   s    ww||DLL$--88r   c                4    \        V4      P                  4       # r   )r
   r(   )clsr0   s   &&r   r(   MigrationWriter.serialize$  s    !%(2244r   c                2    \         P                  ! W4       R # r   )r	   register)r   type_
serializers   &&&r   register_serializer#MigrationWriter.register_serializer(  s    E.r   c                2    \         P                  ! V4       R # r   )r	   
unregister)r   r   s   &&r   unregister_serializer%MigrationWriter.unregister_serializer,  s    e$r   )ri   rh   rj   N)T)r_   rB   r`   ra   __doc__r   r   propertyr   r   r   classmethodr(   r   r   rb   rc   rd   s   @r   r'   r'   v   s     
*
W*r ? ?B - - 9 9 5 5 / / % %r   r'   z4# Generated by Django %(version)s on %(timestamp)s

z%(migration_header)s%(imports)s

class Migration(migrations.Migration):
%(replaces_str)s%(initial_str)s%(atomic_str)s%(run_before_str)s
    dependencies = [
%(dependencies)s    ]

    operations = [
%(operations)s    ]
)r   r   	importlibr   djangor   django.appsr   django.confr   	django.dbr   django.db.migrations.loaderr   django.db.migrations.serializerr	   r
   django.utils.inspectr   django.utils.module_loadingr   django.utils.timezoner   r   r'   r   r    r   r   <module>r      sU    	 	 #   *   7 J . 2 %a$ a$Hx% x%v  r   