U
    ƒe9	  ã                   @   s0   d Z ddlmZ ddlmZ G dd„ deƒZdS )zDatabase schema editor.é    )ÚAny)ÚDatabaseSchemaEditorc                   @   s0   e Zd ZdZeedœdd„Zeedœdd„ZdS )r   z\This class is responsible for emitting schema-changing statements to the
    databases.
    )ÚvalueÚreturnc                 C   sP   | j  ¡  t|tƒr | dd¡}| j j j |¡}t|tƒrLt|tƒrL| ¡ }|S )zQuote value.ú%z%%)	Ú
connectionZensure_connectionÚ
isinstanceÚstrÚreplaceÚ	converterÚescapeÚbytesÚdecode)Úselfr   Úquoted© r   ú^/var/www/html/assets/scripts/venv/lib/python3.8/site-packages/mysql/connector/django/schema.pyÚquote_value,   s    

z DatabaseSchemaEditor.quote_valuec                 C   s   |S )z€Implement the required abstract method.

        MySQL has requires_literal_defaults=False, therefore return the value.
        r   )r   r   r   r   r   Úprepare_default6   s    z$DatabaseSchemaEditor.prepare_defaultN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   '   s   
r   N)r   Útypingr   Zdjango.db.backends.mysql.schemar   ZMySQLDatabaseSchemaEditorr   r   r   r   Ú<module>   s   