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 4will apply migrations 3 and 4. - If the last applied migration was #4,
simple-migrations migrate 2will rollback migrations 3 and 4.
Metadata
Release files for simple-migrations 0.3.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 | |
|---|---|---|---|
| simple_migrations-0.3.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_migrations-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / simple_migrations-0.3.0.tar.gz
| Download URL | simple_migrations-0.3.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71cb1f09e55c5b23f5b3232d8a100197b470c9997f86959ed4cbdaafefc5f42f
|
|
BLAKE2b-256 checksum How to use checksums |
eb6296116787e3ae0b7c597b8ed2d9ee12fb7e4bc3a7de88a8e34a727114b746
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.0 Darwin/22.6.0
|
Release files / simple_migrations-0.3.0-py3-none-any.whl
| Download URL | simple_migrations-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8648ae142de65514580e043d235cbeb868ede9dafb2851999421675c4b0d2aa
|
|
BLAKE2b-256 checksum How to use checksums |
abe21b773de032386d5959647d3b315c18a3d13abc4141b3b5bac9b41abc77ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.0 Darwin/22.6.0
|