A modern migration tool for SQLAlchemy.
Reason this release was yanked:
not first
Project description
Pelican
A modern, minimal migration framework for SQLAlchemy
Pelican is a lightweight tool for managing database schema changes. It focuses on readability, simplicity and clean developer experience.
Example
"""20251002014707 - Create spaceships"""
from pelican import migration, create_table, drop_table
@migration.up
def upgrade():
with create_table('spaceships') as t:
t.string('name', nullable=False)
t.index(['id', 'name'])
@migration.down
def downgrade():
drop_table('spaceships')
Installation
$ pip install pelican @ git+https://github.com/PenguinBoi12/pelican.git@main
(Not available on PyPi yet)
Usage
Create a new migration
$ pelican generate create_spaceships
This creates a new file under db/migrations/ using the default template.
Apply
$ pelican up
Applies all pending migration. You can also supply a revision number to apply migrations up to a specific revision:
$ pelican up 20251002014707
Rollback migration
$ pelican down
Rolls back the latest migrations. You can also supply a revision number to roll back down to a specific revision:
pelican down 20251002014707
Contributing
- Fork the repository.
- Install the development dependencies.
$ pip install -e .[dev]
- Open a PR with your improvements.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pelican_migration-1.0.0a0.tar.gz.
File metadata
- Download URL: pelican_migration-1.0.0a0.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4f54a338639e0eb67939d12878d8f975190364e087cc464d25727a88271c227
|
|
| MD5 |
fe1769940e84856ec9aa3e9c4db16b8e
|
|
| BLAKE2b-256 |
ca7e89385e0af2c7e2b1c86aa7f5952334dbb69bd049a05f566c37666f3a969d
|
File details
Details for the file pelican_migration-1.0.0a0-py3-none-any.whl.
File metadata
- Download URL: pelican_migration-1.0.0a0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a4b69e75a0cf1ab28be780747a58bf4d0b30b1377c4e87809db14426f225c71
|
|
| MD5 |
dac399267b88137da6a09f7f36db14ae
|
|
| BLAKE2b-256 |
b60e189fc804d693578d319c3dc36498767b49966957433c0fcd19ec0967c264
|