ST/setup/alembic2.py

13 lines
330 B
Python
Raw Normal View History

2024-08-26 16:05:26 +08:00
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()