DB migrations and schema changes

Automate Alembic migrations and schema changes for letta-cloud across SQLite and Postgres.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/sarthchawla/InZone --skill db-migrations-and-schema-changes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: DB migrations and schema changes
Source: https://github.com/sarthchawla/InZone/tree/main/.claude/skills/DB%20migrations%20and%20schema%20changes
Command: npx skills add https://github.com/sarthchawla/InZone --skill db-migrations-and-schema-changes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines database migrations and schema changes across different database backends (SQLite and Postgres) for the letta-cloud core app, reducing manual error-prone steps.

Core Features & Use Cases

  • Migration orchestration: Use Alembic to manage revisions, upgrades, and downgrades with minimal risk.
  • Environment flexibility: Switch between SQLite and Postgres using LETTA_PG_URI and uv/just tooling.
  • Guided workflows: Follow established patterns for adding/modifying ORM models and applying migrations safely.

Quick Start

Install prerequisites and run the migration workflow to apply changes to the target database.

Frequently Asked Questions about DB migrations and schema changes

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

FAQPage Schema
How do I manage Alembic migrations when switching between SQLite and Postgres?

Manage Alembic migrations across SQLite and Postgres by setting the LETTA_PG_URI environment variable to switch backends. Use 'just ready' for environment setup and apply version-controlled schema upgrades safely.

What's the best way to autogenerate Alembic revisions for an existing ORM model?

Autogenerate Alembic revisions by modifying your ORM models and running the revision command through uv and Alembic. This detects schema changes and creates version-controlled migration scripts automatically.

Do I need uv and just to run database schema changes for local development?

You need uv and just to run database schema changes for local development. The 'just ready' command uses these tools to orchestrate environment setup and apply Alembic migrations consistently.

Can I use Alembic to apply schema upgrades in production-like environments?

You can use Alembic to apply schema upgrades in production-like environments. The workflow supports version-controlled migrations and database upgrades tailored for both local development and production-like deployments.

Why does my Alembic migration fail when switching database backends?

Alembic migrations may fail when switching database backends if LETTA_PG_URI is not set correctly. Ensure the environment is configured with 'just ready' and the target database URI matches the expected backend.

How does version-controlled migration orchestration reduce manual schema errors?

Version-controlled migration orchestration reduces manual schema errors by automating Alembic revisions, upgrades, and downgrades. This enforces consistent schema changes across SQLite and Postgres environments with minimal risk.