/usr/local/lib/python3.9/site-packages/django/db/backends/sqlite3/__pycache__
a Ӱ�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� Zd)dd�Zd*� fdd� Zd+� fdd� Zd,dd�Zd-� fdd� Z� fdd�Z� fdd�Zd.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 �� std��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__� �K/usr/local/lib/python3.9/site-packages/django/db/backends/sqlite3/schema.pyr s �zDatabaseSchemaEditor.__enter__c s( | j �� t� �|||� | j �� d S �N)r Zcheck_constraintsr �__exit__�enable_constraint_checking)r �exc_type� exc_value� tracebackr r r r '