Edit File: dbmigrate_lib.cpython-311.pyc
� L( e� � �< � d dl mZ d dl mZ d dlZ d dlmZ d dlmZmZm Z n3# e $ r+Zedk r e de� �� � ed� � n� Y dZ[ndZ[ww xY wej � ej � e� � d � � Zd � Zd� Zd� Zd � Zd� Zdd�ZdS )� )�print_function)�absolute_importN)�MigrationContext)�config�command�script�__main__z0Alembic Python library is not installed. Error: � zalembic.inic � � t � � }t j � | � � }d� |� � � D � � }d}|r,|� |� � |� |� � }|�,|S )Nc �, � i | ]}|j pd |j ��S )�base)� down_revision�revision)�.0�ss ��/builddir/build/BUILDROOT/lve-stats-4.2.1-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/utils/dbmigrator/dbmigrate_lib.py� <dictcomp>z,generate_revisions_chain.<locals>.<dictcomp> s/ � � 0� 0� 0��a�o�/���� 0� 0� 0� r )�listr �ScriptDirectory�from_config�walk_revisions�append�get)�alembic_cfg�chain_�script_�revision_pairs�curent_revisions r �generate_revisions_chainr s� � � �V�V�F��$�0�0��=�=�G�0� 0��,�,�.�.�0� 0� 0�N��O� � >�� � �o�&�&�&�(�,�,�_�=�=�� � >� �Mr c � � | � � � }t j |� � }|� � � }|pdS )Nr )�connectr � configure�get_current_revision)�engine� connection�context�current_revs r �get_database_versionr) '