Skip to main content

simple sql migration tool to save you from becoming mad

Project description

Nomad is a simple migration application, which specifically takes into account properties of development with DVCS and is completely agnostic from ORM or whatever you are using to access your database. It uses simple SQL scripts to migrate and can run pre- and post-processing routines written in any language (Python, Ruby or whatever do you use for your application).

https://github.com/piranha/nomad/raw/master/docs/nomad.jpg

Concept

Nomad’s migration store is a directory with nomad.ini and a other directories inside. Each directory in it containing migration.ini is a single migration and name of child directory is an identifier of migration.

It looks like this:

migrations/
  nomad.ini
  2011-11-11-first-migration/
    migration.ini
    up.sql
  2011-11-12-second-migration/
    migration.ini
    1-pre.py
    2-up.sql
    3-post.py

Main properties:

  • There is no downgrades - nobody ever tests them, they are rarely necessary
  • You can write migration in whatever language you want, tool only helps you track applied migrations and dependencies
  • .sql is treated differently and executed against database, configured in nomad.ini
  • Only .sql and executable files (sorry, Windows!) are executed. You can put READMEs, pieces of documentation, whatever you want alongside your migrations.
  • Name matters - everything is executed in order. Order is determined by using human sort (so that x-1.sql is earlier than x-10.sql, you can always check sorting with ls --sort=version).

Project details


Release history Release notifications

History Node

1.20

History Node

1.19

History Node

1.18

History Node

1.17

History Node

1.16

History Node

1.15

History Node

1.14

History Node

1.13

History Node

1.12

History Node

1.11

History Node

1.10

History Node

1.9

History Node

1.8

History Node

1.7

History Node

1.6

History Node

1.5

History Node

1.4

History Node

1.3

History Node

1.2

History Node

1.1

History Node

1.0

History Node

0.5

History Node

0.3

History Node

0.2

This version
History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
nomad-0.1.3.tar.gz (7.1 kB) Copy SHA256 hash SHA256 Source None Sep 21, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page