Socket
Socket
Sign inDemoInstall

orm-migrate

Package Overview
Dependencies
57
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    orm-migrate

A command line tool for https://github.com/locomote/node-migrate-orm2 .


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

A command line tool for https://github.com/locomote/node-migrate-orm2 .

Installation

npm install -g orm-migrate

Usage

♪  node-orm-migrate git:(master) ✗ migrate --help

  Usage: migrate [options]

  Options:

    -h, --help      output usage information
    -V, --version   output the version number
    -g, --generate  Generate a migration
    -u, --up        Run up migrations
    -d, --down      Run down migrations

Generate a migration:

♪  node-orm-migrate git:(master) ✗ migrate -g create-foo
  create : /Users/nicholasf/code/nicholasf/node-orm-migrate/data/migrations/001-create-foo.js
Done.

Perform an up run:

♪  node-orm-migrate git:(master) ✗ migrate -u       
(orm/postgres) CREATE TABLE "orm_migrations" ("migration" TEXT NOT NULL , "direction" TEXT NOT NULL , "created_at" TEXT NOT NULL )
(orm/postgres) SELECT migration FROM orm_migrations ORDER BY created_at DESC LIMIT 1;
  up : data/migrations/001-foo.js.js
(orm/postgres) INSERT INTO orm_migrations(migration, direction, created_at) VALUES('001-foo.js.js', 'up', '2014-05-03T05:42:29.188Z');
  migration : complete
Done.

Perform a down run:

♪  node-orm-migrate git:(master) ✗ migrate -d
(orm/postgres) CREATE TABLE "orm_migrations" ("migration" TEXT NOT NULL , "direction" TEXT NOT NULL , "created_at" TEXT NOT NULL )
(orm/postgres) SELECT migration FROM orm_migrations ORDER BY created_at DESC LIMIT 1;
(orm/postgres) SELECT migration FROM orm_migrations ORDER BY created_at DESC LIMIT 1;
  down : data/migrations/001-foo.js.js
(orm/postgres) INSERT INTO orm_migrations(migration, direction, created_at) VALUES('001-foo.js.js', 'down', '2014-05-03T05:42:52.659Z');
  migration : complete
Done.

That's it! (Made with beer)

FAQs

Last updated on 11 May 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc