Skip to main content

No project description provided

Project description

simple-migrations (beta)

PyPI version Python versions

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_migrations-0.3.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

simple_migrations-0.3.0-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page