Skip to content

fix: expand channels.group column length (#6017)#6111

Draft
cat0825 wants to merge 1 commit into
QuantumNous:mainfrom
cat0825:codex/fix-6017-channel-group-length
Draft

fix: expand channels.group column length (#6017)#6111
cat0825 wants to merge 1 commit into
QuantumNous:mainfrom
cat0825:codex/fix-6017-channel-group-length

Conversation

@cat0825

@cat0825 cat0825 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

将 channels.group 字段从 varchar(64) 扩展到 varchar(1024),避免渠道关联多个/较长分组时保存失败,也避免升级后 AutoMigrate 把字段改回 64。

This PR was AI-assisted and manually reviewed before submission.

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 IssuesPRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

Change is schema-tag only. Verified with:
git show HEAD:model/channel.go | rg 'Group.*varchar\(1024\)'

Summary by CodeRabbit

  • Improvements
    • Increased the maximum supported length for channel group names.
    • Preserved the default group value for new channels.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e918b76-7f1d-4527-a982-ecb93550d506

📥 Commits

Reviewing files that changed from the base of the PR and between ad900bb and a33273b.

📒 Files selected for processing (1)
  • model/channel.go

Walkthrough

The Channel.Group GORM column mapping is widened from varchar(64) to varchar(1024), while its default remains 'default'.

Changes

Channel group column capacity

Layer / File(s) Summary
Widen Channel.Group mapping
model/channel.go
The GORM column type changes to varchar(1024) and retains the 'default' value.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a bunny with a broader lane,
Groups can hop through without strain.
The default stays tucked in place,
While longer names now have space. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: widening the channels.group column length.
Linked Issues check ✅ Passed Changing the GORM column type to varchar(1024) addresses the 64-character limit and steers AutoMigrate to the wider schema.
Out of Scope Changes check ✅ Passed The change is limited to widening channels.group, which is directly required by the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cat0825

cat0825 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

该分支当前可合并,PR Check 与 CodeRabbit 均已通过。PR 仍处于 draft,但 GitHub 拒绝由当前作者账号执行 ready for review(仓库权限不足);烦请维护者协助转为 Ready。

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.

渠道关联的分组数量较多会导致插入SQL报错

1 participant