1 Star 0 Fork 21

jianglei/nas-tools

forked from summit-xf/nas-tools 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
dbscript_gen.py 581 Bytes
Copy Edit Raw Blame History
jxxghp authored 2023-02-27 20:57 . v3.0.0
import os
from config import Config
from alembic.config import Config as AlembicConfig
from alembic.command import revision as alembic_revision
db_version = input("请输入版本号:")
db_location = os.path.join(Config().get_config_path(), 'user.db').replace('\\', '/')
script_location = os.path.join(os.path.dirname(__file__), 'db_scripts').replace('\\', '/')
alembic_cfg = AlembicConfig()
alembic_cfg.set_main_option('script_location', script_location)
alembic_cfg.set_main_option('sqlalchemy.url', f"sqlite:///{db_location}")
alembic_revision(alembic_cfg, db_version, True)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jianglei-123456/nas-tools.git
git@gitee.com:jianglei-123456/nas-tools.git
jianglei-123456
nas-tools
nas-tools
master

Search

0d507c66 1850385 C8b1a773 1850385