sails-generate-migrate

Migration script generator for db-migrate with sails

Showing:

Popularity

Downloads/wk

10

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

5

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Sails Generate Migrate

A migrate generator for use with the Sails command-line interface.

Create new migrations for db-migrate to run when lifting sails. This package is mean for use with sails-hook-migrate.

Dependencies (optional)

You may use with sails-hook-migrate to automatically run migrations when running sails lift

npm i -S sails-hook-migrate`

Installation

npm i -S sails-generate-migrate

Usage

Create a new migration script

Generates a new migration for the specified {model} in a newly created migrations folder at the base of your project.

Edit the generated file(s) to add your migration steps in accordance with db-migrate usage.

$ sails generate migrate create {model}

options

  • --coffee-file
    • Outputs the migration as coffee script
  • --sql-file
    • Outputs the migration as sql
Run a migration up

Runs your migrations scripts against the default environment for your project.

$ sails generate migrate up

options

  • -c {n}
    • run the next n migrations up
Run a migration down

Runs the down migration from the last migration script available.

$ sails generate migrate down

options

  • -c {n}
    • reverse the last n migrations

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial