https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/trac/upgrades/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/trac/upgrades/__pycache__/db44.cpython-310.pyc
o

�k�`��@spddlZddlmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
dZd	d
�ZdZdd
�ZdS)�N)�DatabaseManager)�Column�Table)�ResourceNotFound)�Report)�printout)�_zEhttps://trac.edgewall.org/wiki/1.3/TracUpgrade#enum-description-fieldc
Cs�tddd�td�td�td�td�fg}|j�=t|��|�g}dD])}zt||�}Wn	ty6Yq$wt|j�}|rF||_|�	�q$|�
t|��q$Wd	�n1sXwY|rod
�|�}t
td|td��d	Sd	S)
z)Add `description` column to `enum` table.�enum)�type�name)�keyr
r�value�description)�������Nz, z�Report(s) %(ids)s could not be upgraded and may need to be manually
edited to avoid an "ambiguous column name" error. See %(url)s for more
information.
)�ids�url)rr�db_transactionr�upgrade_tablesrr�replace_sql_fragment�query�update�append�str�joinrrr)�env�version�cursor�
new_schema�failures�id_�rr�r'�4/usr/lib/python3/dist-packages/trac/upgrades/db44.py�
do_upgrades<
���	�

��
��r)z.(?<!\.)(description AS _description)((?=_)|\b)cCs&tt�t|��dkrt�td|�SdS)z�Replace SQL fragment, but try to confirm that the default reports
    haven't been modified. The default reports have at most one
    'description AS ...' fragment.
    rzt.\1N)�len�re�findall�pattern�sub)rr'r'r(r@s�r)r+�trac.db.apir�trac.db.schemarr�
trac.resourcer�trac.ticket.modelr�trac.util.textr�trac.util.translationrrr)r-rr'r'r'r(�<module>s
%

https://t.me/RX1948 - 2025