1 Star 0 Fork 103

Lazy/jxxghp-nas-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dbscript_gen.py 581 Bytes
一键复制 编辑 原始数据 按行查看 历史
jxxghp 提交于 2023-02-13 12:52 . init
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 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/jingyuanliu/jxxghp-nas-tools.git
git@gitee.com:jingyuanliu/jxxghp-nas-tools.git
jingyuanliu
jxxghp-nas-tools
jxxghp-nas-tools
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385