| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/django/db/backends/oracle/__pycache__/ |
Upload File : |
�
�|�e�L � �j � d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m
Z
dZ G d� d e� � ZdS )
� N)�settings)�
DatabaseError)�BaseDatabaseCreation)�get_random_string)�cached_property�test_c �� � e Zd Zed� � � Zd$d�Zd� Zd� Zd� Zd%d�Z d&d �Z
d&d
�Zd� Zd� Z
d&d
�Zd� Zd� Zd'd�Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd � Z d!� Z!d"� Z"d#� Z#dS )(�DatabaseCreationc � � t j | j j }|� d� � p|d }|� d� � p|d }i |�||d��}t | j � � } ||| j j �� � S )a>
This is analogous to other backends' `_nodb_connection` property,
which allows access to an "administrative" connection which can
be used to manage the test databases.
For Oracle, the only connection that can be used for that purpose
is the main (non-test) connection.
�
SAVED_USER�USER�SAVED_PASSWORD�PASSWORD)r
r )�alias)r � DATABASES�
connectionr �get�type)�self�
settings_dict�user�password�DatabaseWrappers �D/usr/lib/python3/dist-packages/django/db/backends/oracle/creation.py�_maindb_connectionz#DatabaseCreation._maindb_connection s� � � !�*�4�?�+@�A�
�� � ��.�.�G�-��2G�� �$�$�%5�6�6�S�-�
�:S��M�=�M�$�H�M�M�M�
��t��/�/����}�D�O�4I�J�J�J�J� � Fc �j � | � � � }| j � � � 5 }| � � � �r | � ||||� � �n�# t
$ �r�}dt
|� � vr,| � d|z � � t j d� � |st d|d z � � }|s|dk �rI|dk r"| � d| j j z � � | �
|||� � n�# t $ r`}d t
|� � v r| � ||||� � n,| � d
|z � � t j d� � Y d }~nFd }~wt
$ r6}| � d
|z � � t j d� � Y d }~nd }~ww xY w | � ||||� � nl# t
$ r6}| � d|z � � t j d� � Y d }~n1d }~ww xY w| � d� � t j d� � Y d }~nd }~ww xY w| � � � �r�|dk r| � d
� � | � ||||� � �nJ# t
$ �r<}dt
|� � vr,| � d|z � � t j d� � |st d|d z � � }|s|dk r� |dk r| � d� � | � |||� � |dk r| � d
� � | � ||||� � nl# t
$ r6}| � d|z � � t j d� � Y d }~n1d }~ww xY w| � d� � t j d� � Y d }~nd }~ww xY wd d d � � n# 1 swxY w Y | j � � � | � |� � | j j d S )N� ORA-01543z+Got an error creating the test database: %s� z^It appears the test database, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: r �yesr �.Destroying old test database for alias '%s'...z ORA-29857z1Got an error destroying the old test database: %sz-Got an error recreating the test database: %szTests cancelled.zCreating test user...� ORA-01920z'Got an error creating the test user: %szZIt appears the test user, %s, already exists. Type 'yes' to delete it, or 'no' to cancel: �Destroying old test user...z)Got an error recreating the test user: %s�NAME)�_get_test_db_paramsr �cursor�_test_database_create�_execute_test_db_creation� Exception�str�log�sys�exit�inputr r �_execute_test_db_destructionr �)_handle_objects_preventing_db_destruction�_test_user_create�_create_test_user�_destroy_test_user�close�_switch_to_test_userr )r � verbosity�autoclobber�keepdb�
parametersr'