1
Fork 0
arcaea-server/database/database_initialize.py
2024-11-24 14:49:34 +07:00

16 lines
513 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import os
import sys
from importlib import import_module
# 数据库初始化文件删掉arcaea_database.db文件后运行即可谨慎使用
def main(core_path: str = '../', db_path: str = './arcaea_database.db', init_folder_path: str = './init'):
sys.path.append(os.path.join(sys.path[0], core_path))
sys.path.append(os.path.join(sys.path[0], core_path, './core/'))
init = import_module('init').DatabaseInit(db_path, init_folder_path)
init.init()
if __name__ == '__main__':
main()