create-migration

Generate and apply timestamped goose database migrations in Go.

1|1|Updated Dec 16, 2023
One-click install
npx skills add https://github.com/sjtw/tarkov-build-optimiser --skill create-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-migration
Source: https://github.com/sjtw/tarkov-build-optimiser/tree/main/.cursor/skills/create-migration
Command: npx skills add https://github.com/sjtw/tarkov-build-optimiser --skill create-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create, apply, and rollback database migrations using goose to manage schema changes safely.

Core Features & Use Cases

  • Generate timestamped migration files in migrations/
  • Implement up/down functions in Go to apply and revert changes
  • Apply migrations across environments (dev, test, prod) with safe rollback

Quick Start

Use goose to create, review, and run migrations for your Go project.

Frequently Asked Questions about create-migration

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

FAQPage Schema
How do I create and apply database migrations in Go?

Database migrations in Go are managed by generating timestamped files in a migrations directory, implementing up and down functions, and applying changes with goose. This Skill automates file creation, applies schema changes, and handles rollbacks across dev, test, and prod environments.

What is the best way to rollback a database schema change safely?

Rolling back a database schema change safely requires implementing down functions in your goose migrations. This Skill generates these up and down pairs, allowing you to revert applied schema changes across dev, test, or prod environments reliably.

Do I need a Go toolchain to manage SQL migrations with goose?

Yes, a Go toolchain is required to manage SQL migrations with goose. This Skill requires a working Go environment and access to a migrations directory to store scripts and version history for applying and rolling back schema changes.

How does goose handle database migrations across different environments?

Goose handles database migrations across environments by tracking version history in a migrations directory. This Skill uses goose to apply or rollback schema changes consistently across dev, test, and prod by running the generated up and down logic.

Can I generate timestamped migration files automatically for my Go project?

Yes, you can generate timestamped migration files automatically for your Go project. This Skill provides tooling to create migration files in a migrations directory, allowing you to implement up and down logic for safe schema changes.