2.1.0 • Published 8 years ago

megrim v2.1.0

Weekly downloads
23
License
MIT
Repository
github
Last release
8 years ago

megrim

Migration Tool for Postgres databases in node.js

usage

node_modules/.bin contains add-migration and migrate.

add-migration

add-migration <name> will add a migration file to schema/$timestamp-$name.sql. Custom SQl can be written into this file.

migrate

migrate will execute all migrations which are not yet in the database. Therefore migrate will look at the environment variable DATABASE_URL.

Technical Implementaiton

megrim = require 'megrim'
megrim path_to_migrations, psql_connection, (err, result) ->
    console.err err if err?
    console.log result

All sql files in path_to_migrations which are not yet in the database are executed. After successful execution the timestamp of the migration file is added to the schema_info table.

The format of the migrations files should be

YYYYMMDDHHMMSS-description.sql

License MIT

2.1.0

8 years ago

2.0.0

8 years ago

1.4.7

8 years ago

1.4.6

8 years ago

1.4.5

8 years ago

1.4.4

8 years ago

1.4.3

8 years ago

1.4.2

9 years ago

1.4.1

9 years ago

1.4.0

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

11 years ago

1.0.2

12 years ago

1.0.1

12 years ago

1.0.0

12 years ago