https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/south/db/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyc
�
(��Pc@sYddlmZddlZddlmZddlmZdejfd��YZdS(i����(tprint_functionN(t
truncate_name(tgenerictDatabaseOperationscBsqeZdZdZdd�Zejejd���Zej	d��Z
d�Zd�Zd�Z
d	�ZRS(
s9
    PsycoPG2 implementation of database operations.
    tpostgrestcCs[t|�dkr?td||d|f|j�jj��Stt|�j|||�S(s�
        Generate a unique name for the index

        Django's logic for naming field indexes is different in the
        postgresql_psycopg2 backend, so we follow that for single-column
        indexes.
        is%s_%s%si(tlenRt_get_connectiontopstmax_name_lengthtsuperRtcreate_index_name(tselft
table_nametcolumn_namestsuffix((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyRs
	cCsI||krgS|jd|j|�|j|�|j|�f�dS(Ns&ALTER TABLE %s RENAME COLUMN %s TO %s;(texecutet
quote_name(RR
toldtnew((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyt
rename_column s	cCs�tjj|||�|jd|dg�rPtjj||d|d�n|jd|g�}|d|kr�tjj||d|d�ndS(sIwill rename the table and an associated ID sequence and primary key indexsu
            SELECT 1
            FROM information_schema.sequences
            WHERE sequence_name = %s
            t_id_seqs-
            SELECT pg_index.indexrelid::regclass
            FROM pg_index, pg_attribute
            WHERE
              indrelid = %s::regclass AND
              pg_attribute.attrelid = indrelid AND
              pg_attribute.attnum = any(pg_index.indkey)
              AND indisprimary
            t_pkeyN(RRtrename_tableR(Rtold_table_nameR
tpkey_index_names((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyR,s!	cCstjj|||�dS(sRename an index individuallyN(RRR(Rtold_index_namet
index_name((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pytrename_indexQscCs6t|tj�rt|�Stt|�j|�SdS(sSupport for UUIDs on psqlN(t
isinstancetuuidtUUIDtstrR
Rt_default_value_workaround(Rtvalue((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyR!Us
cCs|jt|�S(N(t"_db_positive_type_for_alter_columnR(Rtfield((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyt_db_type_for_alter_column\scCs|jt||||�S(N(t_alter_add_positive_checkR(RR$tnametparamstsqls((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyt_alter_add_column_mods_s(t__name__t
__module__t__doc__tbackend_nameRRtcopy_column_constraintstdelete_column_constraintsRtinvalidate_table_constraintsRRR!R%R*(((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyRs%			(t
__future__RRtdjango.db.backends.utilRtsouth.dbRR(((s@/usr/lib/python2.7/site-packages/south/db/postgresql_psycopg2.pyt<module>s

https://t.me/AnonymousX5 - 2025