peewee-moves
A simple and flexible migration manager for Peewee ORM.
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.
Metadata
Release files for ex-peewee-moves 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ex-peewee-moves-2.0.1.tar.gz | 10.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ex_peewee_moves-2.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / ex-peewee-moves-2.0.1.tar.gz
| Download URL | ex-peewee-moves-2.0.1.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
050b878ee43e97ef9e9624d3931353784c583077881a70496813dab55439742c
|
|
BLAKE2b-256 checksum How to use checksums |
7b41a536f22c76e82a13cb5a0e268b1ea23b7a5468db24d38a44a139059e2e83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0b4
|
Release files / ex_peewee_moves-2.0.1-py2.py3-none-any.whl
| Download URL | ex_peewee_moves-2.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d18330d76fd09824ca771382d6d41547cb36e43a97f40e741ab61eebca8884a3
|
|
BLAKE2b-256 checksum How to use checksums |
cbbea0bb6a125bc59092e1681acefba10abf067436cb663f5419326c03d394ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0b4
|