a
    g	g7                     @   s   d dl mZ d dlmZ d dlmZ d dlmZ ejZejdurJeej dZ	ddddZ
ddd	d
Ze rze
  ne  dS )    )
fileConfig)engine_from_config)pool)contextN)returnc                  C   sT   t d} tj| tdddid t  t  W d   n1 sF0    Y  dS )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.

    zsqlalchemy.urlTZ
paramstylenamed)urltarget_metadataZliteral_bindsZdialect_optsN)configZget_main_optionr   	configurer	   begin_transactionrun_migrations)r    r   `/var/www/html/llm_bihealth/app/venv/lib/python3.9/site-packages/alembic/templates/generic/env.pyrun_migrations_offline   s    

r   c               	   C   s   t ttji dtjd} |  N}tj|t	d t
  t  W d   n1 sX0    Y  W d   n1 sv0    Y  dS )zRun migrations in 'online' mode.

    In this scenario we need to create an Engine
    and associate a connection with the context.

    zsqlalchemy.)prefixZ	poolclass)
connectionr	   N)r   r
   Zget_sectionZconfig_ini_sectionr   ZNullPoolconnectr   r   r	   r   r   )Zconnectabler   r   r   r   run_migrations_online5   s    

r   )logging.configr   Z
sqlalchemyr   r   Zalembicr   r
   Zconfig_file_namer	   r   r   Zis_offline_moder   r   r   r   <module>   s   

