+
    Tj 5                         ^ RI t ^ RIt^ 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 R	4      t ! R
 R]4      t ! R R]4      tR# )    N)apps)OutputWrapper)NOT_PROVIDED)timezone)get_docs_version)MigrationLoaderc                   ^   a  ] tR t^t o RtRR ltR tR tR tR t	R t
R	 tR
 tR tRtV tR# )MigrationQuestionerz
Give the autodetector responses to questions it might have.
This base class has a built-in noninteractive mode, but the
interactive subclass is what the command-line arguments will use.
Nc                f    T;'       g    / V n         T;'       g    \        4       V n        W0n        R # N)defaultssetspecified_appsdry_run)selfr   r   r   s   &&&&T/var/www/idalgo/venv/lib/python3.14/site-packages/django/db/migrations/questioner.py__init__MigrationQuestioner.__init__   s&     B,55    c                   WP                   9   d   R#  \        P                  ! V4      p\        P                  ! TP                  4      w  r4Tf   T P                  P                  RR4      #  \        P                  ! T4      p\        TRR4      '       d?   \        P                  ! \        P                  P                  TP                   4      4      pM^\#        TR4      '       dM   \%        TP&                  4      ^8  d   R# \        P                  ! \)        TP&                  4      ^ ,          4      p\*        ;QJ d&    R X 4       F  '       g   K   R'       * # 	  R'       * # ! R X 4       4      '       * #   \         d     T P                  P                  RR4      u # i ; i  \,         d     T P                  P                  RR4      u # i ; i)z2Should we create an initial migration for the app?Task_initialFN__file____path__c              3   T   "   T F  qR 8w  g   K  VP                  R4      x  K   	  R# 5i)z__init__.pyz.pyN)endswith).0xs   & r   	<genexpr>2MigrationQuestioner.ask_initial.<locals>.<genexpr>7   s$     ViCU,1::e,,is   (()r   r   get_app_configLookupErrorr   getr   migrations_modulelabel	importlibimport_modulegetattroslistdirpathdirnamer   hasattrlenr   listanyImportError)r   	app_label
app_configmigrations_import_path_r#   	filenamess   &&     r   r   MigrationQuestioner.ask_initial   sr    +++
	;,,Y7J %4$E$EjFVFV$W!!)==$$]E::	W ) 7 78N O (*d;;JJrww7H7Q7Q'RS	*J77(112Q6 JJt,=,F,F'G'JK	sViVssVVsVVsViVVVV#  	;==$$]E::	;  	;==$$]E::	;s#   E5 -F" 5'FF"'GGc                    R# )#Adding a NOT NULL field to a model.N r   
field_name
model_names   &&&r   ask_not_null_addition)MigrationQuestioner.ask_not_null_addition9        r   c                    R# )"Changing a NULL field to NOT NULL.Nr9   r:   s   &&&r   ask_not_null_alteration+MigrationQuestioner.ask_not_null_alteration>   r?   r   c                :    V P                   P                  RR4      # )Was this field really renamed?
ask_renameFr   r"   )r   r<   old_namenew_namefield_instances   &&&&&r   rF   MigrationQuestioner.ask_renameC   s    }}  u55r   c                :    V P                   P                  RR4      # )Was this model really renamed?ask_rename_modelFrG   )r   old_model_statenew_model_states   &&&r   rN   $MigrationQuestioner.ask_rename_modelG   s    }}  !3U;;r   c                :    V P                   P                  RR4      # )z)Should these migrations really be merged?	ask_mergeFrG   r   r1   s   &&r   rS   MigrationQuestioner.ask_mergeK   s    }}  e44r   c                    R# )(Adding an auto_now_add field to a model.Nr9   r:   s   &&&r   ask_auto_now_add_addition-MigrationQuestioner.ask_auto_now_add_additionO   r?   r   c                    R# ).Adding a unique field with a callable default.Nr9   r:   s   &&&r   $ask_unique_callable_default_addition8MigrationQuestioner.ask_unique_callable_default_additionT   r?   r   )r   r   r   )NNN)__name__
__module____qualname____firstlineno____doc__r   r   r=   rB   rF   rN   rS   rX   r\   __static_attributes____classdictcell__)__classdict__s   @r   r
   r
      s=     
W<

6<5
 r   r
   c                   z   a a ] tR t^Zt oRV 3R lltRR ltR tRR ltR tR t	R t
R tR	 tR
 tR tRtVtV ;t# )InteractiveMigrationQuestionerc                z   < \         SV `  WVR 7       T;'       g    \        \        P                  4      V n        R# )r   r   r   N)superr   r   sysstdoutprompt_output)r   r   r   r   rm   	__class__s   &&&&&r   r   'InteractiveMigrationQuestioner.__init__[   s7     	g 	 	
 +GGmCJJ.Gr   c                @   V P                   P                  V R 2RR7       \        4       pV'       g   Ve   V# V'       d   V^ ,          P                  4       R9  d*   V P                   P                  RRR7       \        4       pKM  V^ ,          P                  4       R8H  # )  endingynzPlease answer yes or no: y)rm   writeinputlower)r   questiondefaultresults   &&& r   _boolean_input-InteractiveMigrationQuestioner._boolean_inputc   s      H:Q ;'-NF1IOO-T9$$%@$LWFay C''r   c                4   V P                   P                  V 4       \        V4       F/  w  r4V P                   P                  R V^,           : RV: 24       K1  	  V P                   P                  RRR7         \        4       p\	        V4      p^ Tu;8  d   \        V4      8:  d    V#  M V P                   P                  RRR7       KT    \         d     L,\         d5    T P                   P                  R4       \        P                  ! ^4        Lii ; i)rq   z) zSelect an option: rr   rs   
Cancelled.zPlease select a valid option: )
rm   rw   	enumeraterx   intr-   
ValueErrorKeyboardInterruptrk   exit)r   rz   choicesichoicer|   values   &&&    r   _choice_input,InteractiveMigrationQuestioner._choice_inputm   s      H:/"7+IA$$!a%%%@A ,  !5b A
!F u,G, L -$$%Eb$Q  $ ""((8s   :C DD"2DDc                |   V P                   P                  R4       V'       d    V P                   P                  RV R24       V P                   P                  R4       V P                   P                  R4        V'       d   RP                  V4      pMRpV P                   P                  VRR	7        \        4       pX'       g   V'       d   TpV'       g   V P                   P                  R4       K|  VR8X  d   \
        P                  ! ^4       K   \        V/ R\        R\        /4      #   \         d5    T P                   P                  R
4       \
        P                  ! ^4        Li ; i  \         dA   pT P                   P                  TP                  P                   RT 24        Rp?EK=  Rp?ii ; i)z
Prompt for a default value.

The ``default`` argument allows providing a custom default value (as a
string) which will be shown to the user and used as the return value
if the user doesn't provide any other input.
z/Please enter the default value as valid Python.zAccept the default 'z/' by pressing 'Enter' or provide another value.zxThe datetime and django.utils.timezone modules are available, so it is possible to provide e.g. timezone.now as a value.zType 'exit' to exit this promptz[default: {}] >>> z>>> rr   rs   r   z;Please enter some code, or 'exit' (without quotes) to exit.r   datetimer   z: N)rm   rw   formatrx   r   rk   r   evalr   r   	Exceptionrn   r^   )r   r{   promptcodees   &&   r   _ask_default+InteractiveMigrationQuestioner._ask_default   s|    	  !RS$$&wi 0) * 	  F	
 	  !BC-44W=$$VB$7w G""((Q Mb:xX*VWW % ""((8 ! M&&,,0D0D/ERs-KLLMs*   4
D. E0 .<E-,E-0F;;4F66F;c                    V P                   '       gK   V P                  RV RV R2RR.4      pV^8X  d   \        P                  ! ^4       R# V P	                  4       # R# )r8   z.It is impossible to add a non-nullable field 'z' to z{ without specifying a default. This is because the database needs something to populate existing rows.
Please select a fix:bProvide a one-off default now (will be set on all existing rows with a null value for this column)6Quit and manually define a default value in models.py.Nr   r   rk   r   r   r   r;   r<   r   s   &&& r   r=   4InteractiveMigrationQuestioner.ask_not_null_addition   su    |||''@ M \ "'(B MF {  ((**r   c                    V P                   '       gX   V P                  RV RV R2. RO4      pV^8X  d   \        # V^8X  d   \        P                  ! ^4       R# V P                  4       # R# )rA   z-It is impossible to change a nullable field 'z' on z to non-nullable without providing a default. This is because the database needs something to populate existing rows.
Please select a fix:N)r   zIgnore for now. Existing rows that contain NULL values will have to be handled manually, for example with a RunPython or RunSQL operation.r   )r   r   r   rk   r   r   r   s   &&& r   rB   6InteractiveMigrationQuestioner.ask_not_null_alteration   sv    |||''?
| L \ "'(
	F" {##1  ((**r   c                j    RpV P                  VVVVVVP                  P                  3,          R4      # )rE   z(Was %s.%s renamed to %s.%s (a %s)? [y/N]F)r}   rn   r^   )r   r<   rH   rI   rJ   msgs   &&&&& r   rF   )InteractiveMigrationQuestioner.ask_rename   sG    8""((11 

 
	
r   c                z    RpV P                  VVP                  VP                  VP                  3,          R4      # )rM   z(Was the model %s.%s renamed to %s? [y/N]F)r}   r1   name)r   rO   rP   r   s   &&& r   rN   /InteractiveMigrationQuestioner.ask_rename_model   sB    8""((/*>*>@T@TUV
 	
r   c                &    V P                  RR4      # )zH
Merging will only work if the operations printed above do not conflict
Fz
Merging will only work if the operations printed above do not conflict
with each other (working on different fields or models)
Should these migration branches be merged? [y/N])r}   rT   s   &&r   rS   (InteractiveMigrationQuestioner.ask_merge   s     ""A 	
 	
r   c                    V P                   '       gM   V P                  RV RV R2RR.4      pV^8X  d   \        P                  ! ^4       R# V P	                  RR7      # R# )	rW   z#It is impossible to add the field 'z' with 'auto_now_add=True' to zf without providing a default. This is because the database needs something to populate existing rows.
zDProvide a one-off default now which will be set on all existing rowsr   ztimezone.now)r{   Nr   r   s   &&& r   rX   8InteractiveMigrationQuestioner.ask_auto_now_add_addition   sv    |||''5j\ B**4 6,-
$L
F {  (((@@r   c                    V P                   '       gG   \        4       pV P                  RV RV R2RV R2R.4      pV^8X  d   \        P                  ! ^4       R# )r[   z!Callable default on unique field .zO will not generate unique values upon migrating.
Please choose how to proceed:
zContinue making this migration as the first step in writing a manual migration to generate unique values described here: https://docs.djangoproject.com/en/z=/howto/writing-migrations/#migrations-that-add-unique-fields.z)Quit and edit field options in models.py.N)r   r   r   rk   r   )r   r;   r<   versionr   s   &&&  r   r\   CInteractiveMigrationQuestioner.ask_unique_callable_default_addition  sw    |||&(G''3J<q M2 39 :A	 BMN
 @	F {r   )rm   )NNNNr   )rr   )r^   r_   r`   ra   r   r}   r   r   r=   rB   rF   rN   rS   rX   r\   rc   rd   __classcell__rn   re   s   @@r   rg   rg   Z   sE     H(R&*MX.8


( r   rg   c                   N   a a ] tR tRt oRV 3R lltR tR tR tR tRt	Vt
V ;t# )	!NonInteractiveMigrationQuestioneri)  c                D   < W@n         WPn        \        SV `  VVVR 7       R# ri   )	verbositylogrj   r   )r   r   r   r   r   r   rn   s   &&&&&&r   r   *NonInteractiveMigrationQuestioner.__init__*  s*     #) 	 	
r   c           	     b    V P                   ^ 8  d   V P                  RV RV RV R24       R# R# )r   Field '' on model 'z' not migrated: r   N)r   r   )r   r;   r<   reasons   &&&&r   log_lack_of_migration7NonInteractiveMigrationQuestioner.log_lack_of_migration:  s;    >>AHH*\*=M(! r   c                X    V P                  VVR 4       \        P                  ! ^4       R# )zIit is impossible to add a non-nullable field without specifying a defaultNr   rk   r   r:   s   &&&r   r=   7NonInteractiveMigrationQuestioner.ask_not_null_additionA  s(    ""	
 	r   c                >    V P                  R V RV R24       \        # )r   r   z8' given a default of NOT PROVIDED and must be corrected.)r   r   r:   s   &&&r   rB   9NonInteractiveMigrationQuestioner.ask_not_null_alterationK  s-    j\j\ :2 3	
 r   c                X    V P                  VVR 4       \        P                  ! ^4       R# )zUit is impossible to add a field with 'auto_now_add=True' without specifying a defaultNr   r:   s   &&&r   rX   ;NonInteractiveMigrationQuestioner.ask_auto_now_add_additionS  s(    ""#	
 	r   )r   r   )NNN   N)r^   r_   r`   ra   r   r   r=   rB   rX   rc   rd   r   r   s   @@r   r   r   )  s#     
  r   r   )r   r%   r(   rk   django.appsr   django.core.management.baser   django.db.modelsr   django.utilsr   django.utils.versionr   loaderr   r
   rg   r   r9   r   r   <module>r      sM      	 
  5 ) ! 1 #H HVL%8 L^2(; 2r   