관리-도구
편집 파일: env.cpython-37.pyc
B �M!V� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ yddl m Z ed W n4 ej Z e �d�Z ee � ed e d d�ZY nX edej d �jjZdZdd� Zdd� Ze�� r�e� ne� dS )z|Pylons bootstrap environment. Place 'pylons_config_file' into alembic.ini, and the application will be loaded from there. � )�context)�loadapp)� fileConfig)�Engine)�config�__file__Zpylons_config_filez config:%s�.)Zrelative_toz %s.model.metazpylons.packageNc C s4 t jtjjtdd� 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. T)�url�target_metadataZ literal_bindsN)r � configure�meta�enginer r �begin_transaction�run_migrations� r r �M/opt/alt/python37/lib/python3.7/site-packages/alembic/templates/pylons/env.py�run_migrations_offline$ s r c C sJ t d��t�� �0} tj| td� 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. z'Please specify engine connectivity here)� connectionr N)�NotImplementedErrorr �connectr r r r r )r r r r �run_migrations_online7 s r )�__doc__�alembicr Zpaste.deployr Zlogging.configr Zsqlalchemy.engine.baser Zpylonsr Z pylons_configZget_main_option�config_fileZwsgi_app� __import__�modelr r r r Zis_offline_moder r r r �<module> s&