Files
wangjia 27dc59ed63 feat(server): pro 套餐设备上限 5 → 3
- seed(sqlite/mysql 000007)+ 001_init:pro max_devices 5→3(全新库直接对)
- 新增迁移 000019(sqlite/mysql,up/down):UPDATE plans SET max_devices=3
  WHERE code='pro' —— 已迁移的线上库靠它更新;down 回退 5
- 000002/001 注释同步(free 1 / pro 3 / team 10)
- 测试:sqlite_migrate 期望版本 18→19;devices 集成测试 pro 断言 5→3
- free(1)/team(10)不变

注:设备上限当前仍未强制执行(登录注册 MaxDevices=0),仅数据/展示口径;
真正启用+超限 UX 见 todo #16。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 18:07:03 +08:00

14 lines
480 B
SQL
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.
-- plans seedfree/pro/team
INSERT INTO plans (code, max_devices, daily_minutes, ad_gate) VALUES
('free', 1, 10, 1),
('pro', 3, NULL, 0),
('team', 10, NULL, 0)
ON CONFLICT(code) DO UPDATE SET
max_devices = excluded.max_devices,
daily_minutes = excluded.daily_minutes,
ad_gate = excluded.ad_gate;
-- directory_version 单例初始化
INSERT INTO directory_version (id, version) VALUES (1, 1)
ON CONFLICT(id) DO UPDATE SET version = excluded.version;