database-changes

Generate idempotent SQL migrations for IdeaForge database schema changes.

6|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/Holo00/IdeaForge --skill database-changes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-changes
Source: https://github.com/Holo00/IdeaForge/tree/main/.claude/skills/database-changes
Command: npx skills add https://github.com/Holo00/IdeaForge --skill database-changes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies and standardizes the process of making database schema changes in the IdeaForge backend, ensuring consistency, preventing errors, and accelerating development.

Core Features & Use Cases

  • Migration Creation: Generate new SQL migration files with sequential numbering and idempotent patterns.
  • Schema Modification: Easily add tables, columns, modify column types, and create indexes.
  • Specialized Column Types: Implement JSONB for flexible, evolving data structures and pgvector for advanced semantic search capabilities.
  • Use Case: "Add a new JSONB column named user_settings to the users table to store flexible user preferences without requiring a new migration for every small change, then update the TypeScript types."

Quick Start

Use the database-changes skill to create a new migration that adds a status column of type VARCHAR(50) to the ideas table.

Frequently Asked Questions about database-changes

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

FAQPage Schema
How do I create idempotent SQL migrations for PostgreSQL schema changes?

Idempotent SQL migrations use IF NOT EXISTS and IF NOT statements to safely re-run without errors. This Skill generates sequential migration files with these patterns built-in, stored in backend/db/migrations, applied via npm run db:migrate to prevent duplicate object creation and enable safe rollback workflows.

Can I add JSONB columns to PostgreSQL tables without creating new migrations for each change?

Yes. JSONB columns store flexible, evolving data structures in a single column, eliminating the need for new migrations when your data schema evolves. This Skill generates JSONB column definitions, allowing you to store complex nested data like user preferences while keeping your migration count minimal.

How do I implement pgvector columns for semantic search in PostgreSQL?

pgvector columns store high-dimensional embeddings for semantic search queries. This Skill generates pgvector column definitions and indexes within your migrations, enabling you to add vector search capabilities to your database without manual SQL or extension setup complications.

What's the best way to keep TypeScript types synchronized with database schema changes?

After running migrations, update your backend/src/types/index.ts and repository files to reflect schema changes. This Skill generates the migrations and guides you through updating type definitions, ensuring your application code stays consistent with your database structure.

Can I modify existing column types and add indexes through file-based migrations?

Yes. This Skill generates migrations that alter column types, add indexes, and modify constraints using raw SQL with idempotent patterns. All changes live in version-controlled migration files, making schema evolution auditable and reproducible across environments.

Do I need an ORM to manage database schema changes in IdeaForge?

No. This Skill uses a file-based, ORM-free workflow with raw SQL migrations. You get full control over your schema without framework abstractions, direct PostgreSQL syntax, and the ability to use advanced features like JSONB and pgvector natively.