fix: migration bug of plugin config

This commit is contained in:
Junyan Qin
2025-09-16 17:04:44 +08:00
parent e7e6eeda61
commit 8bb2f3e745
4 changed files with 12 additions and 6 deletions
@@ -0,0 +1,20 @@
from .. import migration
@migration.migration_class(8)
class DBMigratePluginConfig(migration.DBMigration):
"""插件配置"""
async def upgrade(self):
"""升级"""
if 'plugin' not in self.ap.instance_config.data:
self.ap.instance_config.data['plugin'] = {
'runtime_ws_url': 'ws://localhost:5400/control/ws',
}
await self.ap.instance_config.dump_config()
async def downgrade(self):
"""降级"""
pass