BlueHotDog / sails-migrations

The missing, migrations, arm of the octopus
MIT License
157 stars 36 forks source link

THIS PROJECT IS LOOKING FOR A MAINTAINER

unfortunatly i do not have the time to support this project. so, please help :)

sails-migrations

NPM version Dependency Status Code Climate Build Status

sails-migrations provides an easy way to manage database migrations with sails, based on the amazing https://github.com/tgriesser/knex lib. This means you can have fine-grained control over your schema/data transformations between versions.

Supported sails versions:

sails-migrations supports sails versions 0.9X up to 0.11.2, for both MySQL & PostgreSQL.

Please let us know if you encounter any problem working with sails-migrations by opening an issue.

As of version 2.0 we've moved to using knex schema builder.

NOTE

What db migrations are and how/when to use them:

DB migrations allows you to change your database schema/data in a controlled way by making small atomic/ordered data to your DB, for a better answer, read this

Installing:

First run

npm install -g sails-migrations

this will install the global CLI sails-migrations.

Next you'll need to install sails-migrations within the project you would like to work on:

npm install --save sails-migrations

Usage

Fairly simple, there are a few basic commands

Example apps

You can checkout some example Sails apps.

Commands

For a list of commands, simply run sails-migrations from your command prompt.

Working with migrations

For a more detailed documentation, please refer to http://knexjs.org/ A migration constitutes of two parts: