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/django/db/backends/sqlite3/__pycache__/ |
Upload File : |
o 3�aQ � @ 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 ZdZdZdZdZdZ� fdd�Z� fdd �Z d d� Z d&d d�Zd'� fdd� Zd(� fdd� Z d)dd�Zd'� fdd� Zdd� Zdd� Z d(dd�Zdd� Z� fd d!�Z� fd"d#�Zd$d%� Z� ZS )*�DatabaseSchemaEditorzDROP TABLE %(table)sNzEREFERENCES %(to_table)s (%(to_column)s) DEFERRABLE INITIALLY DEFERREDz7CREATE 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__� �C/usr/lib/python3/dist-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 "