mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-03-24 16:33:48 +08:00
* fix(schema): add missing base columns migration for proxy_config Add compatibility migration for older databases that may be missing the basic proxy_config columns (proxy_enabled, listen_address, listen_port, enable_logging) before adding newer timeout fields. * fix: add proxy_config base column patches for v3.9.0-2 upgrade Add base config column patches in create_tables_on_conn(): - proxy_enabled - listen_address - listen_port - enable_logging Ensures v3.9.0-2 users (user_version=2 but missing columns) can properly upgrade with all required fields added. * fix: migrate proxy_config singleton to per-app on startup for v2 databases Add startup migration for legacy proxy_config tables that still have singleton structure (no app_type column) even with user_version=2. This fixes the issue where v3.9.0-2 databases with v2 schema but legacy proxy_config structure would fail with "no such column: app_type" error. - Call migrate_proxy_config_to_per_app in create_tables_on_conn - Add regression test to verify the fix * style: cargo fmt --------- Co-authored-by: Jason <farion1231@gmail.com>