ST/setup/alembic2.py
2024-08-26 08:05:26 +00:00

13 lines
330 B
Python

import subprocess
def run_service():
bash_cmd = f"""
source /home/lqs1/app/venv/bin/activate && \
cd /home/lqs1/app/server/database && \
alembic revision -m "Initial migration" --autogenerate
"""
subprocess.Popen(bash_cmd, shell=True, executable='/bin/bash')
if __name__ == '__main__':
run_service()