yida-db-seq-fix
OfficialSafely fix PostgreSQL sequence starts to prevent PK conflicts.
Authoropenyida
Version1.0.0
Installs0
System Documentation
What problem does it solve?
PostgreSQL Sequence 自动修复工具。检测宜搭环境自动建表时 Sequence 的起始值是否合理,若存在与当前最大 ID 不一致的情况,提供安全的 dry-run 预览和自动修复,将起始值调整为 max(id) + 1,从而避免插入时产生主键冲突。
Core Features & Use Cases
- Sequence 值自检与对比:检测核心表的当前序列值与表中最大 ID,判断是否需要修复。
- 安全修复流程:先 dry-run 预览,确认影响范围,再执行修复并验证结果。
- 审计与回溯:将修复操作记录到日志,便于问题追踪和追溯。
Quick Start
在开发环境下执行 openyida db-seq-fix --dry-run 来预览影响,然后再执行 openyida db-seq-fix --fix 进行修复并验证结果。
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: yida-db-seq-fix Download link: https://github.com/openyida/openyida/archive/main.zip#yida-db-seq-fix Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.