No project description provided
Project description
simple-migrations (beta)
The feedback and contributions are appreciated!
Make your database migrations as simple as possible!
simple-migrations
is a library that allows you to write database migrations in a pure SQL.
The order of migrations will be tracked in the database table.
You can specify the forwards
and backwards
command and even write your own scripts.
No need to apply the scripts manually, you can now automate your deployment flow!
Keep in mind that the library is still in development and is distributed "as is".
How to use
The example of the config can be found in simple_migrations.ini
file.
Create a simple_migrations.ini
file in the project root and set up the database credentials.
Run simple-migrations init
to generate the migrations directory and migrations table.
Run simple-migrations generate
to generate the migration file from the template.
Run simple-migrations migrate
to apply all unapplied migrations.
Run simple-migrations migrate <num>
to migrate or rollback to migration, for example:
- If the last applied migration was #2,
simple-migrations migrate 4
will apply migrations 3 and 4. - If the last applied migration was #4,
simple-migrations migrate 2
will rollback migrations 3 and 4.
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
File details
Details for the file simple_migrations-0.2.0.tar.gz
.
File metadata
- Download URL: simple_migrations-0.2.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c440f2d1c80dc8b7f759710168e3fc4d042fb8e3b13e2d22d250e1ee05afc3f |
|
MD5 | f013f64aaa7f122409364c7bf3953059 |
|
BLAKE2b-256 | ecfdb31a62cbd7bca0602d44b2eea89110e44e26fb59838810f2d3241fee38a9 |
File details
Details for the file simple_migrations-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: simple_migrations-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c738f6e4169707316b940d3521853f2200f750b8b8c9331fc8491db99c19983 |
|
MD5 | 6ae5a6c5fb072fb9d9e0c03e9b92ae5c |
|
BLAKE2b-256 | cfd56d25600baeb25d163d374cf7b8828e856dae599ea5ab37c3ba462e55e690 |