
    g                        S SK r S SKrS SKJr  S SKJr  S SKJr  \R                  r\" \R                  5        \R                  " S5      rS rS r\R                  S\" 5       5        \R                  S	   R                   rS
 rS rS rS r\R,                  " 5       (       a  \" 5         g\ R.                  " 5       R1                  \" 5       5        g)    N)
fileConfig)current_app)contextzalembic.envc                       [         R                  S   R                  R                  5       $ ! [        [
        4 a*    [         R                  S   R                  R                  s $ f = f)Nmigrate)r   
extensionsdb
get_engine	TypeErrorAttributeErrorengine     l/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/flask_migrate/templates/aioflask/env.pyr
   r
      sX    ;%%i033>>@@~& ;%%i033:::;s   *- 7A'&A'c                       [        5       R                  R                  SS9R                  SS5      $ ! [         a0    [        [        5       R                  5      R                  SS5      s $ f = f)NF)hide_password%z%%)r
   urlrender_as_stringreplacer   strr   r   r   get_engine_urlr      sd    8|00u0EMM 	 8:<##$,,S$778s   03 7A-,A-sqlalchemy.urlr   c                  r    [        [        S5      (       a  [        R                  S    $ [        R                  $ )N	metadatas)hasattr	target_dbr   metadatar   r   r   get_metadatar   1   s,    y+&&""4((r   c                      [         R                  S5      n [        R                  " U [	        5       SS9  [        R
                  " 5          [        R                  " 5         SSS5        g! , (       d  f       g= f)a*  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.

r   T)r   target_metadataliteral_bindsN)configget_main_optionr   	configurer   begin_transactionrun_migrations)r   s    r   run_migrations_offliner(   7   sR     
 
 !1
2Ct 
	"	"	$  
%	$	$s   	A((
A6c                 :   S n[         R                  S   R                  nUR                  S5      c  XS'   [        R
                  " SU [        5       S.UD6  [        R                  " 5          [        R                  " 5         S S S 5        g ! , (       d  f       g = f)Nc                     [        [        R                  SS5      (       a@  US   nUR                  R	                  5       (       a  / US S & [
        R                  S5        g g g )NautogenerateFr   zNo changes in schema detected.)getattrr#   cmd_optsupgrade_opsis_emptyloggerinfo)r   revision
directivesscripts       r   process_revision_directives6do_run_migrations.<locals>.process_revision_directivesP   sS    6??NE::]F!!**,, "
1<= - ;r   r   r5   )
connectionr!   r   )	r   r   configure_argsgetr   r%   r   r&   r'   )r7   r5   	conf_argss      r   do_run_migrationsr;   L   s    > &&y1@@I}}23;3N/0 $  
	"	"	$  
%	$	$s   -B
Bc                     #    [        5       n U R                  5        ISh  vN nUR                  [        5      I Sh  vN   SSS5      ISh  vN   g N2 N N	! , ISh  vN  (       d  f       g= f7f)z}Run migrations in 'online' mode.

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

N)r
   connectrun_syncr;   )connectabler7   s     r   run_migrations_onliner@   e   sP      ,K""$$
!!"3444 %$$4 %$$$sT   A4AA4AAAA4AA4AA4A1 A#!A1-A4)asynciologginglogging.configr   flaskr   alembicr   r#   config_file_name	getLoggerr0   r
   r   set_main_optionr   r	   r   r   r(   r;   r@   is_offline_modeget_event_looprun_until_completer   r   r   <module>rL      s      %   
 6"" #			=	);8   ')9 :""9-00	!*!25 //0E0GHr   