create-migration

Generate Goose-format SQL migration files with Up and Down statements.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/microservices-agent-skills --skill create-migration-vesviet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-migration
Source: https://github.com/vesviet/microservices-agent-skills/tree/main/skills/create-migration
Command: npx skills add https://github.com/vesviet/microservices-agent-skills --skill create-migration-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating new database migrations for microservices, ensuring adherence to established naming conventions, required annotations, and best practices for schema changes.

Core Features & Use Cases

  • Automated Migration Generation: Creates new SQL migration files for database schema modifications.
  • Standardized Naming & Structure: Enforces consistent file naming and includes essential Goose annotations (-- +goose Up, -- +goose Down).
  • Best Practice Guidance: Provides examples and explanations for UUID primary keys, timestamps, foreign keys, indexes (including CONCURRENTLY), enums, and JSONB fields.
  • Use Case: When a new feature requires adding a preferences table to the users service, this skill will generate the 003_add_preferences_table.sql migration file with appropriate Up and Down statements, and guide you on updating GORM models and the CHANGELOG.

Quick Start

Use the create-migration skill to generate a new SQL migration file for adding a 'status' column to the 'orders' table.

Frequently Asked Questions about create-migration

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

FAQPage Schema
How do I generate a database migration file with Goose format for a microservice?

To generate a database migration file with Goose format, use this Skill to automatically create SQL scripts containing essential `-- +goose Up` and `-- +goose Down` annotations. It enforces consistent file naming and standardizes schema changes for microservices.

What is the standard way to add a new table column using a SQL migration?

The standard way to add a new table column using a SQL migration is by generating Up and Down statements. This Skill creates the migration file and guides you on updating GORM models and repository interfaces to reflect the schema modification.

Does this migration generator support UUID primary keys and soft deletes?

Yes, this migration generator supports UUID primary keys and soft deletes. It enforces project-specific patterns for these fields and provides best practice guidance for timestamps, foreign keys, and JSONB fields in the generated SQL.

Can I create indexes concurrently in my database schema migrations?

Yes, you can create indexes concurrently in your database schema migrations. The Skill provides specific examples and explanations for defining indexes using the `CONCURRENTLY` option within the generated Goose Up and Down SQL statements.

What is the best way to manage database schema changes across multiple microservices?

The best way to manage database schema changes across microservices is by enforcing standardized naming conventions and structured annotations. This Skill streamlines that process by generating compliant SQL migration files and guiding updates to your CHANGELOG.md.

How do I update GORM models after creating a new SQL migration?

To update GORM models after creating a new SQL migration, follow the guidance provided by the Skill upon file generation. It outlines the necessary steps to align your repository interfaces and GORM structures with the newly applied database schema changes.