mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 12:10:57 +00:00
feat: 配置项目的热修改
This commit is contained in:
@ -43,9 +43,14 @@ class GlobalPlugin(LiteModel):
|
||||
enabled: bool = Field(True, alias="enabled")
|
||||
|
||||
|
||||
class StoredConfig(LiteModel):
|
||||
TABLE_NAME = "stored_config"
|
||||
config: dict = {}
|
||||
|
||||
|
||||
def auto_migrate():
|
||||
print("Migrating databases...")
|
||||
user_db.auto_migrate(User())
|
||||
group_db.auto_migrate(Group())
|
||||
plugin_db.auto_migrate(InstalledPlugin(), GlobalPlugin())
|
||||
common_db.auto_migrate(GlobalPlugin())
|
||||
common_db.auto_migrate(GlobalPlugin(), StoredConfig())
|
||||
|
||||
|
Reference in New Issue
Block a user