Skip to content

fix(db): fix missing remarks and auto_select fields in subscription#1893

Merged
MarksonHon merged 1 commit into
v2rayA:mainfrom
fnMrRice:fix-subscription
Jul 1, 2026
Merged

fix(db): fix missing remarks and auto_select fields in subscription#1893
MarksonHon merged 1 commit into
v2rayA:mainfrom
fnMrRice:fix-subscription

Conversation

@fnMrRice

@fnMrRice fnMrRice commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

The SubscriptionRaw Go struct has Remarks and AutoSelect fields, but the SQLite schema and CRUD operations never included them after the BoltDB→SQLite migration. This caused:

  • GET /api/touch returning subscriptions without remarks
  • PATCH /api/subscription silently dropping remark/autoSelect updates

Changes

  • schema.go — added remarks and auto_select columns to subscriptions table; added MigrateSchema() to auto-heal existing databases via ALTER TABLE
  • listOp.go — ListSet/ListGet/ListAppend/ListGetAll now include remarks and autoSelect in SQL and JSON reconstruction
  • migrate.go — BoltDB→SQLite migration now transfers remarks and autoSelect
  • sqlite.go — initDB() calls MigrateSchema() after InitSchema()

@MarksonHon MarksonHon merged commit 8185b77 into v2rayA:main Jul 1, 2026
7 checks passed
@fnMrRice fnMrRice deleted the fix-subscription branch July 6, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants