File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/django/db/backends/sqlite3/__pycache__/schema.cpython-310.pyc
Back
o �h�_ � @ s| d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m Z d dlmZ d dl mZ d d lmZ G d d� de�ZdS )� N)�Decimal)�Apps)�NotSupportedError)�BaseDatabaseSchemaEditor)� Statement)�strip_quotes)�UniqueConstraint)�atomicc s� e Zd ZdZdZdZeZdZdZdZ dZ dZ� fdd�Z� fd d �Z dd� Zd d� Z d)dd�Z d*� fdd� Zd+� fdd� Z d,dd�Zd*� fdd� Z� fdd�Z� fdd�Z d+dd �Zd!d"� Z� fd#d$�Z� fd%d&�Zd'd(� Z� ZS )-�DatabaseSchemaEditorzDROP TABLE %(table)sNzEREFERENCES %(to_table)s (%(to_column)s) DEFERRABLE INITIALLY DEFERREDz,ALTER TABLE %(table)s DROP COLUMN %(column)sz7CREATE UNIQUE INDEX %(name)s ON %(table)s (%(columns)s)zDROP INDEX %(name)sc s | j �� s td��t� �� S )Nz�SQLite schema editor cannot be used while foreign key constraint checks are enabled. Make sure to disable them before entering a transaction.atomic() context because SQLite does not support disabling them in the middle of a multi-statement transaction.)� connection�disable_constraint_checkingr �super� __enter__��self�� __class__� �T/usr/local/CyberCP/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.pyr s � zDatabaseSchemaEditor.__enter__c s( | j �� t� �|||� | j �� d S �N)r �check_constraintsr �__exit__�enable_constraint_checking)r �exc_type� exc_value� tracebackr r r r '