관리-도구
편집 파일: env.cpython-38.pyc
U 0?�f7 � @ s� d dl mZ d dlmZ d dlmZ d dlmZ ejZejdk rJeej� dZ dd�dd�Z dd�d d �Ze�� rze � ne� dS )� )� fileConfig)�engine_from_config)�pool)�contextN)�returnc C s@ t �d�} tj| tdddid� t�� � t�� W 5 Q R X dS )aF Run migrations in 'offline' mode. This configures the context with just a URL and not an Engine, though an Engine is acceptable here as well. By skipping the Engine creation we don't even need a DBAPI to be available. Calls to context.execute() here emit the given string to the script output. zsqlalchemy.urlTZ paramstyle�named)�url�target_metadataZ literal_bindsZdialect_optsN)�configZget_main_optionr � configurer �begin_transaction�run_migrations)r � r �K/opt/hc_python/lib/python3.8/site-packages/alembic/templates/generic/env.py�run_migrations_offline s � r c C s\ t t�tji �dtjd�} | �� �0}tj|t d� t� � � t�� W 5 Q R X W 5 Q R X dS )z�Run migrations in 'online' mode. In this scenario we need to create an Engine and associate a connection with the context. zsqlalchemy.)�prefixZ poolclass)� connectionr N)r r Zget_sectionZconfig_ini_sectionr ZNullPool�connectr r r r r )Zconnectabler r r r �run_migrations_online5 s � � r ) �logging.configr Z sqlalchemyr r �alembicr r Zconfig_file_namer r r Zis_offline_moder r r r �<module> s