;M d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dl m Z d d l mZ d d l mZ d dl m Z d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ ddlmZ er6d dlmZ d dlmZ d dlmZ d dlmZ d dlm Z d dlm!Z! d dlm"Z" d dl#m$Z$ ddl%m&Z& G d de Z' eed d'd& Z(dS )( )annotationsN)Any)Dict)Optional) TYPE_CHECKING)Union)cast)JSON)schema)sql)compiles )alter_table)format_table_name)RenameTable)DefaultImpl )util) Inspector)DDLCompiler)Cast) ClauseElement)Column) Constraint)Table) TypeEngine)BatchOperationsImplc l e Zd ZdZdZ d(dZd)d Zd)dZd*dZd+dZ d,dZ d-d. fd Zd/d&Zd' Z xZS )0 SQLiteImplsqliteFbatch_opr returnboolc \ |j D ]}|d dk r|d d }t |j t j r't |j j t j r dS t |j t j j r|j j r dS |d dvr dS dS )zReturn True if the given :class:`.BatchOperationsImpl` would need the table to be recreated and copied in order to proceed. Normally, only returns True on SQLite when operations other than add_column are present. r add_columnr T)create_index drop_indexF)batch isinstanceserver_defaultr DefaultClauseargr r r sqla_compatComputed persisted)selfr! opcols d/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/alembic/ddl/sqlite.pyrequires_recreate_in_batchz%SQLiteImpl.requires_recreate_in_batch+ s . B!u$$eAh&(< !3!79JKK 44s143C3LMM *4 44A<<<tt = 5 constr c |j t d | | rt j d d S d S )NNo support for ALTER of constraints in SQLite dialect. Please refer to the batch mode feature which allows for SQLite migrations using a copy-and-move strategy.zSkipping unsupported ALTER for creation of implicit constraint. Please refer to the batch mode feature which allows for SQLite migrations using a copy-and-move strategy.)_create_ruleNotImplementedErrorr warnr0 r6 s r3 add_constraintzSQLiteImpl.add_constraintG sk %%D % % ID r5 c 2 |j t d d S )Nr8 )r9 r: r<