관리-도구
편집 파일: env.cpython-37.opt-1.pyc
B �M!V� � @ sr d dl mZ d dlmZ d dlmZmZ d dlmZ ej Z ee j � dZdd� Zdd � Z e�� rhe� ne � dS ) � )�with_statement)�context)�engine_from_config�pool)� fileConfigNc C s: t �d�} tj| tdd� t�� � t�� W dQ 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.urlT)�url�target_metadataZ literal_bindsN)�configZget_main_optionr � configurer �begin_transaction�run_migrations)r � r �N/opt/alt/python37/lib/python3.7/site-packages/alembic/templates/generic/env.py�run_migrations_offline s r c C sZ t t�tj�dtjd�} | �� �0}tj|t d� t� � � t�� W dQ R X W dQ 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 ZNullPoolZconnectr r r r r )Zconnectabler r r r �run_migrations_online. s r )Z __future__r Zalembicr Z sqlalchemyr r Zlogging.configr r Zconfig_file_namer r r Zis_offline_moder r r r �<module> s