Skip to main content

Simple and flexible migration manager for Peewee ORM.

Project description

A simple and flexible migration manager for Peewee ORM.

Build Status Code Coverage Version Downloads Documentation

Requirements

  • python >= 3.4, <= 3.6

  • peewee >= 3.0.0

Installation

This package can be installed using pip:

pip install peewee-moves

Usage

Here’s a quick teaser of what you can do with peewee-moves:

$ export FLASK_APP=myflaskapp

$ flask db create app.models.Category
INFO: created migration 0001_create_table_category

$ flask db revision "do something"
INFO: created migration 0002_do_something

$ flask db upgrade
INFO: 0001_create_table_category: upgrade
INFO: 0002_do_something: upgrade

$ flask db downgrade
INFO: 0002_do_something: downgrade

$ flask db status
INFO: 0001_create_table_category: applied
INFO: 0002_do_something: pending

And if you’re curious, here’s what 0001_create_table_category.py looks like. A migration was automatically created based on the definition of the Category model.

def upgrade(migrator):
    with migrator.create_table('category') as table:
        table.primary_key('id')
        table.integer('code', unique=True)
        table.string('name', max_length=250)

def downgrade(migrator):
    migrator.drop_table('category')

Documentation

Check out the Full Documentation for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peewee-moves-2.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

peewee_moves-2.1.0-py2.py3-none-any.whl (11.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file peewee-moves-2.1.0.tar.gz.

File metadata

  • Download URL: peewee-moves-2.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for peewee-moves-2.1.0.tar.gz
Algorithm Hash digest
SHA256 01b8764243cdba861566789c6a1a3626ef9b91a434b2dac47553c195eeda321e
MD5 325be427e29999ce2eb434d601dbfe07
BLAKE2b-256 0696a1bcc6a8bc9061a2c4dae99890335844fedfa3d5487eddf1985fcfcadcfe

See more details on using hashes here.

File details

Details for the file peewee_moves-2.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: peewee_moves-2.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4

File hashes

Hashes for peewee_moves-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a2d77baa1aa081ae3cc20f57171dd343fc3127cc6e200eb8f0913f34840959ea
MD5 bfc8e9e2608e854b0d029659a039fc9a
BLAKE2b-256 4675183b5f5986c6ac62ed7e984324978f7e3923ef4747e10543b8678c42c8c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page