postgres-migration-from-sqlite
CommunityMigrate from SQLite to PostgreSQL safely.
Authorsaintgo7
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill resolves production database write-lock issues and scalability limits caused by running a FastAPI/SQLAlchemy/Alembic app on SQLite by guiding a safe migration to PostgreSQL.
Core Features & Use Cases
- DSN migration for SQLAlchemy (async + Alembic): Switches from a SQLite file-backed connection to a PostgreSQL host/port/database/user DSN while aligning asyncpg/psycopg2 expectations.
- Alembic schema alignment: Helps you stamp or re-initialize PostgreSQL schema so migrations continue to work correctly after the backend switch.
- Data transfer + SERIAL sequence recovery: Moves data via table-by-table CSV extraction and PostgreSQL COPY, then repairs SERIAL/IDENTITY sequences to prevent duplicate key failures.
- Verification and rollback planning: Provides row-count and sample-query checks and a rollback approach by reverting the application to SQLite and handling potential new data loss.
Quick Start
Instruct the AI to produce a step-by-step SQLite-to-PostgreSQL migration plan for a FastAPI/SQLAlchemy/Alembic service experiencing "database is locked" under high concurrency, including Alembic strategy, data transfer method, SERIAL sequence repair, and verification commands.
Dependency Matrix
Required Modules
sqlite3psqlpg_dump
Components
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: postgres-migration-from-sqlite Download link: https://github.com/saintgo7/claude-skills/archive/main.zip#postgres-migration-from-sqlite Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.