MIGRATIONS - nself-org/cli GitHub Wiki

Database Migrations Guide

Version control your database schema with migrations.

Overview

Migrations track schema changes:

  • Create tables
  • Add columns
  • Modify indexes
  • Run any SQL

Creating Migrations

nself db migrate create "add_posts_table"

Edit the migration file and add SQL.

Running Migrations

nself db migrate

Rollback

nself db migrate rollback

See Database Guide for complete reference.

⚠️ **GitHub.com Fallback** ⚠️