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 peewee-moves 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| peewee-moves-2.1.0.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| peewee_moves-2.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 22.4 kB
Release files / peewee-moves-2.1.0.tar.gz
| Download URL | peewee-moves-2.1.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01b8764243cdba861566789c6a1a3626ef9b91a434b2dac47553c195eeda321e
|
|
BLAKE2b-256 checksum How to use checksums |
0696a1bcc6a8bc9061a2c4dae99890335844fedfa3d5487eddf1985fcfcadcfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / peewee_moves-2.1.0-py2.py3-none-any.whl
| Download URL | peewee_moves-2.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a2d77baa1aa081ae3cc20f57171dd343fc3127cc6e200eb8f0913f34840959ea
|
|
BLAKE2b-256 checksum How to use checksums |
4675183b5f5986c6ac62ed7e984324978f7e3923ef4747e10543b8678c42c8c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|