migrate

Manage PostgreSQL schema migrations with goose and validate against GORM models.

23|1|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/PeterBooker/veloria --skill migrate-peterbooker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate
Source: https://github.com/PeterBooker/veloria/tree/main/.claude/skills/migrate
Command: npx skills add https://github.com/PeterBooker/veloria --skill migrate-peterbooker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of managing database schema changes, ensuring consistency and preventing data loss during updates.

Core Features & Use Cases

  • Create Migrations: Generate new SQL migration files for schema modifications.
  • Apply Migrations: Run pending database migrations to update the schema.
  • Rollback Migrations: Revert the last applied migration.
  • Check Status: View the current state of database migrations.
  • Validate Migrations: Ensure migrations are reversible and align with GORM models.
  • Use Case: When adding a new users table, use this Skill to create a migration file, apply it to the database, and later roll it back if necessary.

Quick Start

Use the migrate skill to create a new migration file named add_user_preferences.

Frequently Asked Questions about migrate

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

FAQPage Schema
How do I manage database schema migrations for PostgreSQL using GORM?

You can manage database schema migrations by generating SQL migration files, applying pending changes, and rolling back updates using the goose tool while validating against GORM models. This ensures schema consistency and prevents data loss during PostgreSQL updates.

How do I create and apply reversible SQL schema changes in Go?

To create reversible SQL schema changes, generate a new migration file and apply it to the database. You can later revert the last applied migration to undo the schema modifications, ensuring every database update can be safely rolled back.

Can I validate that my SQL migrations align with my GORM models?

Yes, you can validate migrations to ensure they are reversible and properly align with your GORM models. This validation checks that your PostgreSQL schema changes match your application's data structures and maintain proper indexing for performance.

Does the goose migration tool work with GORM for PostgreSQL databases?

Yes, goose works with GORM for PostgreSQL databases by managing the SQL migration files and validating them against GORM models. This combination ensures reversible schema changes and proper indexing while maintaining database consistency.

What is the best way to roll back a database migration if something goes wrong?

The best way to roll back a database migration is to use the rollback feature to revert the last applied migration. This approach is supported by ensuring all migrations are reversible, allowing you to safely undo schema changes without losing data.

How do I check the status of pending database migrations?

You can check the status of database migrations to view the current state of applied and pending schema changes. This allows you to verify which migrations have been executed against your PostgreSQL database and which ones are still waiting to be applied.