pip 安裝 403 錯(cuò)誤解決
pip install azure-eventhub==5.11.2 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install -r /opt/python_linde/requirements/requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
alembic 使用
初始化
alembic init alembic_repos
生成遷移腳本
第一次執(zhí)行 生成空模版
alembic revision -m "<Description>"
關(guān)聯(lián)orm后,自動(dòng)生成
alembic revision --autogenerate -m "<Description>"
遷移命令
-
alembic upgrade head
:將數(shù)據(jù)庫升級(jí)到最新版本。 -
alembic downgrade base
:將數(shù)據(jù)庫降級(jí)到最初版本。 -
alembic upgrade <version>
:將數(shù)據(jù)庫升級(jí)到指定版本。 -
alembic downgrade <version>
:將數(shù)據(jù)庫降級(jí)到指定版本。 -
alembic upgrade +2
:相對(duì)升級(jí),將數(shù)據(jù)庫升級(jí)到當(dāng)前版本后的兩個(gè)版本。 -
alembic downgrade +2
:相對(duì)降級(jí),將數(shù)據(jù)庫降級(jí)到當(dāng)前版本前的兩個(gè)版本。