go-database

Standardize Go database migrations and GORM usage for production systems.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/vincent119/ai-rules-kit --skill go-database-vincent119
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: go-database
Source: https://github.com/vincent119/ai-rules-kit/tree/main/skills/go-database
Command: npx skills add https://github.com/vincent119/ai-rules-kit --skill go-database-vincent119

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go Database Migration and ORM standards to unify migration tooling choices, naming conventions, version control, CI/CD integration, and best practices for safe production usage.

Core Features & Use Cases

  • Migration tooling standardization: pick a single tool (golang-migrate or goose) per project.
  • Naming conventions and version control: enforce consistent migration file naming and pair up up/down migrations.
  • CI/CD integration and production safeguards: recommend pre-deploy migrations and avoid risky AutoMigrate usage in production.

Quick Start

Set up the project to follow the go-database standards by selecting a single migration tool and integrating versioned migrations into CI/CD.

Frequently Asked Questions about go-database

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

FAQPage Schema
How do I standardize Go database migrations to prevent schema drift in production?▼

GORM AutoMigrate is risky in production because it can perform destructive schema changes unpredictably. To avoid this, use pre-deploy versioned migration files with tools like golang-migrate or goose, which offer controlled up and down schema transitions.

What is the best way to choose between golang-migrate and goose for a Go project?▼

The best practice for choosing between golang-migrate and goose is to pick a single tool per project and enforce it consistently. Standardizing on one migration tool prevents integration conflicts and simplifies CI/CD pipeline management across your Go applications.

How do I pair up and down database migrations in Go?▼

To pair up and down database migrations in Go, enforce a strict naming convention where every forward migration file has a corresponding rollback file. This practice ensures safe production rollbacks and maintains database schema integrity during CI/CD deployments.

Can I integrate Go database migrations into a CI/CD pipeline?▼

Yes, you can integrate Go database migrations into a CI/CD pipeline by running pre-deploy migration steps using versioned files. This approach automates schema updates safely and prevents risky auto-migration behaviors in live production environments.

Why should I forbid GORM AutoMigrate in production Go applications?▼

You should forbid GORM AutoMigrate in production Go applications because it can cause unintended schema drift and data loss. Instead, use explicit versioned migrations with tools like golang-migrate or goose to ensure safe, controlled database schema changes.