yida-db-seq-fix

Repair PostgreSQL Sequence issues in Yida app databases.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ythm/openyida --skill yida-db-seq-fix-ythm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yida-db-seq-fix
Source: https://github.com/ythm/openyida/tree/main/yida-skills/skills/yida-db-seq-fix
Command: npx skills add https://github.com/ythm/openyida --skill yida-db-seq-fix-ythm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the repair of PostgreSQL Sequence issues, preventing primary key conflicts in your Yida app databases.

Core Features & Use Cases

  • Automatic Detection: Identifies and corrects Sequence starting values that cause primary key conflicts after database migrations.
  • Dry Run Option: Allows you to preview the necessary repairs without executing them.
  • Safe Execution: Ensures database integrity by verifying Sequence values after repair.
  • Use Case: If you are experiencing errors due to incorrect Sequence starting values after data migration, this Skill can help you resolve these issues quickly.

Quick Start

Run a dry run to see which Sequences need repair: openyida db-seq-fix --dry-run. Then, perform the actual repair: openyida db-seq-fix --fix.

Frequently Asked Questions about yida-db-seq-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does a primary key conflict occur in PostgreSQL after a database migration?

PostgreSQL Sequence issues arise after database migrations when Sequence starting values become misaligned with existing table data, causing new insertions to generate duplicate keys and trigger primary key conflicts.

How do I fix PostgreSQL Sequence issues in a Yida app database?

Fix PostgreSQL Sequence issues in a Yida app database by running an automated repair script that detects incorrect starting values and resets them, ensuring database integrity and preventing future primary key conflicts.

Can I preview PostgreSQL Sequence repairs before applying changes to the database?

Yes, you can preview PostgreSQL Sequence repairs by using the dry run option, which identifies and displays the necessary Sequence starting value corrections without executing any actual changes to your database.

Do I need access to the Yida database environment to run a Sequence fix?

Yes, you need access to the Yida database environment and PostgreSQL to run the Sequence fix, as the tool must connect directly to the database to detect and repair incorrect Sequence values.

What is the best way to prevent primary key conflicts after migrating data to PostgreSQL?

The best way to prevent primary key conflicts after migration is to automate the repair of PostgreSQL Sequence starting values, verifying that they align with existing data to ensure database integrity.