Database

Manage PostgreSQL schema evolution with golang-migrate versioned SQL migrations.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/nhattran998/crossfire --skill database-nhattran998
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database
Source: https://github.com/nhattran998/crossfire/tree/main/.agents/skills/database
Command: npx skills add https://github.com/nhattran998/crossfire --skill database-nhattran998

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of keeping PostgreSQL database schemas consistent and reproducible across environments by using version-controlled, reversible migrations.

Core Features & Use Cases

  • PostgreSQL schema capabilities: Designs migrations that leverage PostgreSQL strengths such as JSONB, indexes, constraints, window functions, CTEs, full-text search, and partitioning strategies.
  • golang-migrate driven workflow: Uses golang-migrate to manage up/down migrations, version tracking, and reliable schema evolution.
  • Migration strategy best practices: Supports a disciplined approach where each logical change is captured as a discrete reversible migration, enabling safe collaboration and deployment.

Quick Start

Run your migration tool against your PostgreSQL database to apply the next schema version from your migrations directory.

Frequently Asked Questions about Database

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

FAQPage Schema
How do I manage PostgreSQL schema migrations with golang-migrate?

PostgreSQL schema migrations are managed with golang-migrate by applying versioned up and down SQL files from a migrations directory, enabling deterministic schema updates and reliable rollback across environments.

What is the best way to keep database schemas consistent across multiple environments?

Database schema consistency is maintained by using version-controlled, reversible migrations where each logical change is captured as a discrete SQL file, enabling safe team collaboration and reliable deployment across environments.

Can I use PostgreSQL-specific features like JSONB and full-text search in schema migrations?

PostgreSQL features like JSONB, full-text search, indexes, constraints, window functions, CTEs, and partitioning are fully supported within schema migrations, allowing you to leverage database strengths directly in reversible SQL files.

Do I need a separate migrations directory to version my PostgreSQL schema?

A migrations directory containing reversible SQL files is required to version your PostgreSQL schema, as golang-migrate relies on this structured directory to track applied versions and execute deterministic up or down schema updates.

How do I safely alter columns and add SQL constraints in a production database?

Safely altering columns and adding SQL constraints is accomplished by capturing each logical change as a discrete reversible migration file, enabling deterministic application and reliable rollback if deployment issues arise.

Why is database versioning important for team workflows?

Database versioning is important for team workflows because it tracks schema evolution through versioned SQL files, preventing manual drift and ensuring every developer applies the same deterministic schema changes across environments.