U
    -d                  
   @   s  d dl mZ d dlZd dlmZ d dlZd dlmZ d dlm	Z	 d dlm
Z
mZ ejeed  d dlT eeed	d
dZe	Z	e	jZeej ejjjjse  ejjjjjZejjjjjZe 4Z e	j!e eded e	"  e	#  W 5 Q R X W 5 Q R X e$  dS )    )PathN)
fileConfig)EnvironmentContext)context)engine_from_configpool.)*)nametype_
_reflectedc                 C   s2   |dkr| drdS |dkr*d|kr*dS dS dS )aA  
    include_object: A callable function which is given
    the chance to return ``True`` or ``False`` for any object,
    indicating if the given object should be considered in the
    autogenerate sweep.

    The function accepts the following positional arguments:

    * ``object``: a :class:`~sqlalchemy.schema.SchemaItem` object such
    as a :class:`~sqlalchemy.schema.Table`,
    :class:`~sqlalchemy.schema.Column`,
    :class:`~sqlalchemy.schema.Index`
    :class:`~sqlalchemy.schema.UniqueConstraint`,
    or :class:`~sqlalchemy.schema.ForeignKeyConstraint` object
    * ``name``: the name of the object. This is typically available
    via ``object.name``.
    * ``type``: a string describing the type of object; currently
    ``"table"``, ``"column"``, ``"index"``, ``"unique_constraint"``,
    or ``"foreign_key_constraint"``
    * ``reflected``: ``True`` if the given object was produced based on
    table reflection, ``False`` if it's from a local :class:`.MetaData`
    object.
    * ``compare_to``: the object being compared against, if available,
    else ``None``.
    columncf_FindexZ_cf_TN)
startswith)_objr
   r   r   Z_compare_to r   /opt/account/alembic/env.pyinclude_object   s
    r   T)
connectiontarget_metadatacompare_typer   )%pathlibr   sysZlogging.configr   
sqlalchemyZalembic.runtime.environmentr   alembicr   r   r   pathappendstrresolve
cmf.manageboolr   configconfig_file_namecmfmodels	BaseModeldpdata_driverinit_dsengineconnectabledb_metar   connectr   	configurebegin_transactionrun_migrationsdisposer   r   r   r   <module>   s4   $


