+
    Tj!                         R t ^ RIHt  ! R R4      t ! R R]4      t ! R R]4      t ! R R	]4      t ! R
 R]4      t ! R R]4      t ! R R]4      t	 ! R R]4      t
 ! R R]4      tR# )z~
Helpers to manipulate deferred DDL statements that might need to be adjusted or
discarded within when executing a migration.
)deepcopyc                   N   a  ] tR t^	t o RtR tR tR tR tR t	R t
R tR	tV tR
# )	Referencez0Base class that defines the reference interface.c                    R# )zE
Return whether or not this instance references the specified table.
F selftables   &&V/var/www/idalgo/venv/lib/python3.14/site-packages/django/db/backends/ddl_references.pyreferences_tableReference.references_table            c                    R# )zF
Return whether or not this instance references the specified column.
Fr   r   r	   columns   &&&r
   references_columnReference.references_column   r   r   c                    R# )zE
Return whether or not this instance references the specified index.
Fr   r   r	   indexs   &&&r
   references_indexReference.references_index   r   r   c                    R# )z9
Rename all references to the old_name to the new_table.
Nr   r   	old_table	new_tables   &&&r
   rename_table_references!Reference.rename_table_references        	r   c                    R# )z<
Rename all references to the old_column to the new_column.
Nr   )r   r	   
old_column
new_columns   &&&&r
   rename_column_references"Reference.rename_column_references$   r   r   c                R    R V P                   P                  : R\        V 4      : R2# )< >)	__class____name__strr   s   &r
   __repr__Reference.__repr__*   s     NN33SY??r   c                    \        R 4      h)z>Subclasses must define how they should be converted to string.)NotImplementedErrorr,   s   &r
   __str__Reference.__str__-   s    !L
 	
r   r   N)r*   
__module____qualname____firstlineno____doc__r   r   r   r   r#   r-   r1   __static_attributes____classdictcell____classdict__s   @r
   r   r   	   s1     :@
 
r   r   c                   B   a  ] tR t^3t o RtR tR tR tR tR t	Rt
V tR# )	TablezHold a reference to a table.c                    Wn         W n        R # N)r	   
quote_name)r   r	   r?   s   &&&r
   __init__Table.__init__6   s    
$r   c                     V P                   V8H  # r>   r	   r   s   &&r
   r   Table.references_table:   s    zzU""r   c                P    V P                  V4      ;'       d    \        V 4      V8H  # r>   )r   r+   r   s   &&&r
   r   Table.references_index=   s$    $$U+BBD	U0BBr   c                8    V P                   V8X  d	   W n         R # R # r>   rC   r   s   &&&r
   r   Table.rename_table_references@   s    ::""J #r   c                8    V P                  V P                  4      # r>   r?   r	   r,   s   &r
   r1   Table.__str__D   s    tzz**r   rJ   N)r*   r3   r4   r5   r6   r@   r   r   r   r1   r7   r8   r9   s   @r
   r<   r<   3   s'     &%#C#+ +r   r<   c                   6   a  ] tR t^Ht o RtR tR tR tRtV t	R# )TableColumnsz9Base class for references to multiple columns of a table.c                    Wn         W n        R # r>   r	   columns)r   r	   rP   s   &&&r
   r@   TableColumns.__init__K   s    
r   c                L    V P                   V8H  ;'       d    W P                  9   # r>   rO   r   s   &&&r
   r   TableColumns.references_columnO   s     zzU"==v'==r   c                    V P                   V8X  d7   \        V P                  4       F  w  rEWR8X  g   K  W0P                  V&   K  	  R # R # r>   )r	   	enumeraterP   )r   r	   r!   r"   r   r   s   &&&&  r
   r#   %TableColumns.rename_column_referencesR   s:    ::!*4<<!8'*4LL' "9 r   )rP   r	   N)
r*   r3   r4   r5   r6   r@   r   r#   r7   r8   r9   s   @r
   rM   rM   H   s     C>5 5r   rM   c                   @   a a ] tR t^Yt oRtRV 3R lltR tRtVtV ;t	# )Columnsz(Hold a reference to one or many columns.c                >   < W0n         W@n        \        SV `  W4       R # r>   )r?   col_suffixessuperr@   )r   r	   rP   r?   rZ   r)   s   &&&&&r
   r@   Columns.__init__\   s    $((r   c                n   a a V 3R  loRP                  V3R l\        S P                  4       4       4      # )c                    < SP                  V 4      p SP                  V,          pV'       d   R P                  W#4      pV#   \         d     T# i ; iz{} {})r?   rZ   format
IndexErrorr   idxcolsuffixr   s   &&  r
   col_str Columns.__str__.<locals>.col_strb   sW    //&)C**3/!..5C J  Js   A A AA, c              3   8   <"   T F  w  rS! W!4      x  K  	  R # 5ir>   r   .0rc   r   rf   s   &  r
   	<genexpr>"Columns.__str__.<locals>.<genexpr>l         
4K[SGF  4K   joinrU   rP   r   rf   s   f@r
   r1   Columns.__str__a   s1    	 yy 
4=dll4K
 
 	
r   )rZ   r?   )r   
r*   r3   r4   r5   r6   r@   r1   r7   r8   __classcell__r)   r:   s   @@r
   rX   rX   Y   s     2)

 
r   rX   c                   <   a a ] tR t^qt oRtV 3R ltR tRtVtV ;t	# )	IndexNamez"Hold a reference to an index name.c                >   < W0n         W@n        \        SV `  W4       R # r>   )re   create_index_namer[   r@   )r   r	   rP   re   rz   r)   s   &&&&&r
   r@   IndexName.__init__t   s    !2(r   c                d    V P                  V P                  V P                  V P                  4      # r>   )rz   r	   rP   re   r,   s   &r
   r1   IndexName.__str__y   s#    %%djj$,,LLr   )rz   re   rt   rv   s   @@r
   rx   rx   q   s     ,)
M Mr   rx   c                   <   a a ] tR t^}t oRV 3R lltR tRtVtV ;t# )IndexColumnsc                4   < WPn         \        SV `	  WW44       R # r>   )	opclassesr[   r@   )r   r	   rP   r?   rZ   r   r)   s   &&&&&&r
   r@   IndexColumns.__init__~   s    "Br   c                n   a a V 3R  loRP                  V3R l\        S P                  4       4       4      # )c                    < R P                  SP                  V 4      SP                  V,          4      p SP                  V,          pV'       d   R P                  W#4      pV#   \         d     T# i ; ir_   )r`   r?   r   rZ   ra   rb   s   &&  r
   rf   %IndexColumns.__str__.<locals>.col_str   sm     ..!8$..:MNC**3/!..5C J  Js   A# A# #A21A2rh   c              3   8   <"   T F  w  rS! W!4      x  K  	  R # 5ir>   r   rj   s   &  r
   rl   'IndexColumns.__str__.<locals>.<genexpr>   rn   ro   rp   rr   s   f@r
   r1   IndexColumns.__str__   s1    
	 yy 
4=dll4K
 
 	
r   )r   )r   r   )	r*   r3   r4   r5   r@   r1   r7   r8   ru   rv   s   @@r
   r   r   }   s     C
 
r   r   c                   l   a a ] tR t^t oRtV 3R ltV 3R ltV 3R ltV 3R ltV 3R lt	R t
RtVtV ;t# )	ForeignKeyNamez'Hold a reference to a foreign key name.c                `   < \        W44      V n        WPn        W`n        \        SV `  VV4       R # r>   )rM   to_referencesuffix_templatecreate_fk_namer[   r@   )r   
from_tablefrom_columnsto_table
to_columnsr   r   r)   s   &&&&&&&r
   r@   ForeignKeyName.__init__   s1     )>.,	
r   c                h   < \         SV `  V4      ;'       g    V P                  P                  V4      # r>   )r[   r   r   )r   r	   r)   s   &&r
   r   ForeignKeyName.references_table   s5    w'. 
 
$2C2C2T2T3
 	
r   c                h   < \         SV `  W4      ;'       g    V P                  P                  W4      # r>   )r[   r   r   )r   r	   r   r)   s   &&&r
   r    ForeignKeyName.references_column   s9    w(
 @ @00?	@r   c                \   < \         SV `  W4       V P                  P                  W4       R # r>   )r[   r   r   r   r   r   r)   s   &&&r
   r   &ForeignKeyName.rename_table_references   s$    '	=11)Gr   c                `   < \         SV `  WV4       V P                  P                  WV4       R # r>   )r[   r#   r   )r   r	   r!   r"   r)   s   &&&&r
   r#   'ForeignKeyName.rename_column_references   s(    (JG225jQr   c                    V P                   R V P                  P                  RV P                  P                  ^ ,          /,          pV P	                  V P                  V P                  V4      # )r   	to_column)r   r   r	   rP   r   )r   re   s   & r
   r1   ForeignKeyName.__str__   s]    %%))//**2215)
 
 ""4::t||VDDr   )r   r   r   )r*   r3   r4   r5   r6   r@   r   r   r   r#   r1   r7   r8   ru   rv   s   @@r
   r   r      s0     1
"

@
HRE Er   r   c                   N   a  ] tR t^t o RtR tR tR tR tR t	R t
R tR	tV tR
# )	Statementz
Statement template and formatting parameters container.

Allows keeping a reference to a statement without interpolating identifiers
that might have to be adjusted if they're referencing a table or column
that is removed
c                    Wn         W n        R # r>   templateparts)r   r   r   s   &&,r
   r@   Statement.__init__   s     
r   c                   a \         ;QJ d7    V3R  lV P                  P                  4        4       F  '       g   K   R# 	  R# ! V3R  lV P                  P                  4        4       4      # )c              3   n   <"   T F*  p\        VR 4      ;'       d    VP                  S4      x  K,  	  R# 5i)r   N)hasattrr   )rk   partr	   s   & r
   rl   -Statement.references_table.<locals>.<genexpr>   s6      
+ D,-NN$2G2G2NN+s   55TFanyr   valuesr   s   &fr
   r   Statement.references_table   sX    s 


))+
ss 	
s 	
s 


))+
 
 	
r   c                   aa \         ;QJ d8    VV3R  lV P                  P                  4        4       F  '       g   K   R# 	  R# ! VV3R  lV P                  P                  4        4       4      # )c              3   p   <"   T F+  p\        VR 4      ;'       d    VP                  SS4      x  K-  	  R# 5i)r   N)r   r   )rk   r   r   r	   s   & r
   rl   .Statement.references_column.<locals>.<genexpr>   s9      
+ D-.XX43I3I%QW3XX+   66TFr   r   s   &ffr
   r   Statement.references_column   X    s 


))+
ss 	
s 	
s 


))+
 
 	
r   c                   aa \         ;QJ d8    VV3R  lV P                  P                  4        4       F  '       g   K   R# 	  R# ! VV3R  lV P                  P                  4        4       4      # )c              3   p   <"   T F+  p\        VR 4      ;'       d    VP                  SS4      x  K-  	  R# 5i)r   N)r   r   )rk   r   r   r	   s   & r
   rl   -Statement.references_index.<locals>.<genexpr>   s8      
+ D,-UU$2G2Gu2UU+r   TFr   r   s   &ffr
   r   Statement.references_index   r   r   c                    V P                   P                  4        F(  p\        VR 4      '       g   K  VP                  W4       K*  	  R# )r   N)r   r   r   r   )r   r   r   r   s   &&& r
   r   !Statement.rename_table_references   s5    JJ%%'Dt677,,YB (r   c                    V P                   P                  4        F)  p\        VR 4      '       g   K  VP                  WV4       K+  	  R# )r#   N)r   r   r   r#   )r   r	   r!   r"   r   s   &&&& r
   r#   "Statement.rename_column_references   s7    JJ%%'Dt788--eL (r   c                <    V P                   V P                  ,          # r>   r   r,   s   &r
   r1   Statement.__str__   s    }}tzz))r   )r   r   N)r*   r3   r4   r5   r6   r@   r   r   r   r   r#   r1   r7   r8   r9   s   @r
   r   r      s4     


C
M
* *r   r   c                   J   a a ] tR t^t oV 3R ltV 3R ltR tR tRtVt	V ;t
# )Expressionsc                   < W0n         W n        W@n        V P                   P                  P	                  V P                  .4       Uu. uF  pVP
                  P                  NK  	  pp\        SV `!  W4       R # u upi r>   )	compilerexpressionsquote_valuequery	_gen_colstargetr   r[   r@   )r   r	   r   r   r   rd   rP   r)   s   &&&&&  r
   r@   Expressions.__init__   sr     && }}**44d6F6F5GH
H JJH 	 
 	(	
s   A8c                   < V P                   V8w  d   R # V P                  P                  W/4      V n        \        SV `  W4       R # r>   )r	   r   relabeled_cloner[   r   r   s   &&&r
   r   #Expressions.rename_table_references   s;    ::"++;;Y<RS'	=r   c                ~   V P                   V8w  d   R # \        V P                  4      p. V n        V P                  P
                  P                  V.4       F]  pVP                  P                  V8X  d   W5P                  n        V P                  P                  VP                  P                  4       K_  	  W@n        R # r>   )
r	   r   r   rP   r   r   r   r   r   append)r   r	   r!   r"   r   rd   s   &&&&  r
   r#   $Expressions.rename_column_references   s    ::t//0==&&00+?Czz  J.$.

!LL

 1 12 @ 'r   c                    V P                   P                  V P                  4      w  r\        V P                  V4      pV\        V4      ,          # r>   )r   compiler   mapr   tuple)r   sqlparamss   &  r
   r1   Expressions.__str__  s?    mm++D,<,<=T%%v.U6]""r   )rP   r   r   r   )r*   r3   r4   r5   r@   r   r#   r1   r7   r8   ru   rv   s   @@r
   r   r      s     )>	'# #r   r   N)r6   copyr   r   r<   rM   rX   rx   r   r   r   r   r   r   r
   <module>r      s   
 '
 '
T+I +*55 5"
l 
0	M 	M
7 
.+E\ +E\**	 **Z#, #r   