--- id: peewee-migrate version: "1.15.0" license: MIT license_treatment: permissive maintenance: active --- # peewee-migrate — Support for migrations in Peewee ORM License: permissive · Maintenance: active · Downloads: 229.7K/mo ## What it is and what it does Peewee Migrate is a migration management tool for Peewee ORM that handles database schema versioning through timestamped migration files. It works by storing migration state in your database and applying or rolling back changes in order, supporting both automatic schema detection and manual migration writing. You can use it either as a command-line tool (pw_migrate) or programmatically via the Router class. The package handles the common workflow of creating new migrations, running pending migrations, and rolling back applied migrations. It integrates with click for CLI functionality and depends only on peewee itself, keeping the dependency footprint minimal. Use it for: - Track and version database schema changes across development, staging, and production environments. - Automatically generate migration files by scanning model definitions for changes. - Roll back failed migrations or revert to earlier schema versions when needed. - Manage migrations for Peewee-based applications without manual SQL scripting. - Integrate migrations into deployment pipelines via the command-line interface. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Peewee Migrate provides a command-line and programmatic interface for creating, running, and rolling back database migrations for Peewee ORM applications. Yes. Peewee Migrate is actively maintained, has no known vulnerabilities, and provides a straightforward migration workflow for Peewee ORM users. The low install friction and permissive MIT license make it a practical choice for projects using Peewee. Install it if you need reliable schema versioning for a Peewee application. ## Install pip install peewee-migrate uv add peewee-migrate poetry add peewee-migrate ## Installing peewee-migrate Before you install: Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release and no known vulnerabilities. Requires peewee >= 3.10 and Python >= 3.10. License in practice: MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely provided you include the license notice. Quickstart: pip install peewee-migrate from peewee_migrate import Router from peewee import SqliteDatabase router = Router(SqliteDatabase('test.db')) router.create('migration_name') router.run() Requires peewee >= 3.10 and Python >= 3.10; migration files must define a migrate() function in the migrations directory. Verify before relying: - Whether autodiscovery of model changes works reliably across all project structures and import patterns. - Performance characteristics when managing large numbers of migrations or complex schema changes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 229.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags peewee database migrations, orm migration tool, database schema versioning, peewee migration cli, automatic schema generation, database rollback management, peewee migration engine, database-migrations, peewee-orm, schema-versioning [View on SkillFed](https://skillfed.io/packages/peewee-migrate) · [View on PyPI](https://pypi.org/project/peewee-migrate/)