+
    Tj                     h    ^ RI t ^ 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 R]
4      tR# )    N)Path)NotSupportedError)BaseDatabaseCreationc                   b   a  ] tR t^t o ]R 4       tR tRR ltR tRR lt	R t
R tR tR	tV tR
# )DatabaseCreationc                `    \        V \        4      '       * ;'       d    V R 8H  ;'       g    RV 9   # ):memory:zmode=memory)
isinstancer   )database_names   &X/var/www/idalgo/venv/lib/python3.14/site-packages/django/db/backends/sqlite3/creation.pyis_in_memory_db DatabaseCreation.is_in_memory_db   s3    mT22 
 
Z'II=M+I	
    c                    V P                   P                  R ,          R,          ;'       g    RpVR8X  d   RV P                   P                  ,          # V# )TESTNAMEr	   z)file:memorydb_%s?mode=memory&cache=shared)
connectionsettings_dictalias)selftest_database_names   & r   _get_test_db_name"DatabaseCreation._get_test_db_name   sG    !__::6B6JXXj+>AVAVVV!!r   c                v   V P                  4       pV'       d   V# V P                  V4      '       g   V^8  d&   V P                  RV P                  W4      : R24       \        P
                  ! V\        P                  4      '       dj   V'       g   \        RV,          4      pV'       g   XR8X  d    \        P                  ! V4       V# V P                  R4       \        P                  ! ^4       V#   \         d:   pT P                  RT,          4       \        P                  ! ^4        Rp?T# Rp?ii ; i)   'Destroying old test database for alias ...zXType 'yes' if you would like to try deleting the test database '%s', or 'no' to cancel: yes/Got an error deleting the old test database: %sNzTests cancelled.)r   r   log_get_database_display_strosaccessF_OKinputremove	Exceptionsysexit)r   	verbosityautoclobberkeepdbr   confirmes   &&&&   r   _create_test_db DatabaseCreation._create_test_db   s   !335%%##$677A~55iTW yy+RWW55"#=?QRG 'U"2$		"45 "! HH/0HHQK!! % $!RUV!VW "!$s   3C4 4D8?.D33D8c                   V P                   P                  pVR ,          ;'       g    RpV P                  V4      '       g1   \        P                  P                  V4      w  rE/ VCR V RV V 2/C# \        P                  ! 4       pVR8X  d   V# VR9   d#   / VCR V P                   P                   RV R2/C# \        RV: R24      h)r   r	   _forkz.sqlite3zCloning with start method z is not supported.>   spawn
forkserver)
r   r   r   r"   pathsplitextmultiprocessingget_start_methodr   r   )r   suffixorig_settings_dictsource_database_namerootextstart_methods   &&     r   get_test_db_clone_settings+DatabaseCreation.get_test_db_clone_settings6   s    !__::1&9GGZ##$899(()=>IDJ(J&TF!F8C52IJJ&7796!%%22$4??0016((C   ((88JK
 	
r   c                   V P                   P                  R ,          pV P                  V4      R ,          pV P                  V4      '       g   \        P
                  ! V\        P                  4      '       dN   V'       d   R# V^8  d&   V P                  RV P                  W%4      : R24        \        P                  ! V4        \        P                  ! WE4       R# \        P                   ! 4       R9   dP   \"        P$                  ! VRR7      pV P                   P                   P'                  V4       VP)                  4        R# R#   \         d9   pT P                  RT,          4       \        P                  ! ^4        Rp?LRp?ii ; i  \         d:   pT P                  RT,          4       \        P                  ! ^4        Rp?R# Rp?ii ; i)	r   Nr   r   r   z*Got an error cloning the test database: %sTuri>   r4   r5   )r   r   r@   r   r"   r#   r$   r    r!   r&   r'   r(   r)   shutilcopyr8   r9   sqlite3connectbackupclose)r   r:   r*   r,   r<   target_database_namer.   	ondisk_dbs   &&&&    r   _clone_test_dbDatabaseCreation._clone_test_dbJ   sY   #<<VD#>>vFvN##$899yy-rww77>HH !:: ) II230G --/3JJ(<$GIOO&&--i8OO K !  HHNQRRSHHQKK 
  EIJs0   /E	 F 	F.FFG.GGc                x    V'       d2   V P                  V4      '       g   \        P                  ! V4       R # R # R # )N)r   r"   r&   )r   r   r*   s   &&&r   _destroy_test_db!DatabaseCreation._destroy_test_dbm   s,    d&:&:;M&N&NII() 'Or   c                   V P                  4       pV P                  P                  R,          .pV P                  V4      '       d'   VP	                  V P                  P
                  4       MVP	                  V4       \        V4      # )z
Return a tuple that uniquely identifies a test database.

This takes into account the special cases of ":memory:" and "" for
SQLite since the databases will be distinct despite having the same
TEST NAME. See https://www.sqlite.org/inmemorydb.html
r   )r   r   r   r   appendr   tuple)r   r   sigs   &  r   test_db_signature"DatabaseCreation.test_db_signaturer   si     "335,,V45 233JJt,,-JJ)*Szr   c                   V P                  V4      p\        P                  ! 4       pVR 8X  dB   V P                  P                  P                  V4       V P                  P                  4        R	# VR
9   d   V P                  P                  pRV RV R2pV P                  P                  P                  RV RV R2RR7      p\        P                  ! VRR7      pVP                  V4       VP                  4        V P                  P                  P                  V4       WPP                  P                  R&   V P                  P                  4        VP                  4        R	# R	# )r3   zfile:memorydb_r2   z?mode=memory&cache=sharedzfile:z.sqlite3?mode=roTrC   r   N>   r4   r5   )r@   r8   r9   r   r   updaterJ   r   DatabaserH   rG   rI   )r   
_worker_idr   r?   r   connection_str	source_db	target_dbs   &&      r   setup_worker_connection(DatabaseCreation.setup_worker_connection   s-   77
C '7796!OO))00?OO!!#44OO))E q4MN  0088wa
|+;<$ 9 I  DAIY'OOOO))00?4BOO))&1 OO##%OO# 5r    N)F)__name__
__module____qualname____firstlineno__staticmethodr   r   r/   r@   rM   rP   rV   r_   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s@     
 

"":
(!F*
  r   r   )r8   r"   rE   rG   r(   pathlibr   	django.dbr    django.db.backends.base.creationr   r   ra   r   r   <module>rm      s,     	   
  ' AQ+ Qr   