agentsclimarketplace

Migration start

Skill xataio/nextjs-claude-code-starter/.claude/skills/migration-start

Production-ready Next.js + Postgres starter with 6 Claude Code skills. Zero-downtime migrations, instant DB branches, PII-safe prod clones. MIT licensed.

Install
npx -y skills add xataio/nextjs-claude-code-starter --skill migration-start

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Begin a zero-downtime schema migration using pgroll

SKILL.md

1.5 KB, as published. Nobody here has run it

Start a migration

Begin a zero-downtime schema migration using pgroll.

Usage

xata roll start <migration-file.yaml>

Example

# Start the migration (expand phase)
xata roll start migrations/002_add_role.yaml

# Test your changes with both old and new schemas running
npm run dev
# ... verify everything works ...

# Complete the migration (contract phase)
xata roll complete

How pgroll works

pgroll uses an expand-contract pattern:

Expand phase (xata roll start)

  • Creates new columns/tables
  • Sets up views for both old and new schemas
  • Installs triggers to keep both in sync
  • Both versions of your app work simultaneously

Contract phase (xata roll complete)

  • Removes old schema views
  • Drops sync triggers
  • Cleans up

Migration file format

pgroll migrations are YAML files with declarative operations:

operations:
  - add_column:
      table: users
      column:
        name: role
        type: text
        nullable: false
        default: "'member'"

Common operations

  • create_table — Create a new table
  • add_column — Add a column to existing table
  • drop_column — Remove a column
  • rename_column — Rename a column
  • alter_column — Modify column properties
  • create_index — Add an index

See pgroll documentation for all operations.

Check migration status

xata roll status

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.