update kinit-api/scripts/initialize/initialize.py.
解决不能自动新建数据库表问题。 Signed-off-by: liujian8670 <10318920+liujian8670@user.noreply.gitee.com>
This commit is contained in:
parent
b0e6efe6c7
commit
3894b1b19e
@ -47,8 +47,8 @@ class InitializeData:
|
||||
"""
|
||||
模型迁移映射到数据库
|
||||
"""
|
||||
subprocess.check_call(f'alembic --name {env.value} revision --autogenerate -m "{VERSION}"', cwd=BASE_DIR)
|
||||
subprocess.check_call(f'alembic --name {env.value} upgrade head', cwd=BASE_DIR)
|
||||
subprocess.check_call(['alembic', '--name', f'{env.value}', 'revision', '--autogenerate', '-m', f'{VERSION}'], cwd=BASE_DIR)
|
||||
subprocess.check_call(['alembic', '--name', f'{env.value}', 'upgrade', 'head'], cwd=BASE_DIR)
|
||||
print(f"环境:{env} {VERSION} 数据库表迁移完成")
|
||||
|
||||
def __serializer_data(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user