Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ah-sequelize-plugin

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ah-sequelize-plugin - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

15

initializers/sequelize.js

@@ -18,7 +18,14 @@ var path = require('path');

migrate: function(next){
migrate: function(opts, next){
if(typeof opts === "function"){
next = opts;
opts = null;
}
opts = opts === null ? { method: 'up' } : opts;
var migrator = api.sequelize.sequelize.getMigrator({
path: api.project_root + '/migrations'
});
migrator.migrate({ method: 'up' }).success(function() {
migrator.migrate(opts).success(function() {
next();

@@ -28,2 +35,6 @@ });

migrateUndo: function(next) {
this.migrate({ method: 'down' }, next);
},
connect: function(next){

@@ -30,0 +41,0 @@ var self = this;

2

package.json

@@ -5,3 +5,3 @@ {

"description": "I use sequelize in actionhero as an ORM",
"version": "0.0.5",
"version": "0.1.0",
"homepage": "http://actionherojs.com",

@@ -8,0 +8,0 @@ "repository": {

@@ -32,3 +32,4 @@ # ah-sequelize-plugin

You can add a migration grunt helper to your actionhero project by adding the below to your `gruntfile.js`:
You can use the [sequelize-cli](http://sequelizejs.com/docs/latest/migrations#cli) for more utilities or
you can add a migration grunt helper(s) to your actionhero project by adding the below to your `gruntfile.js`:

@@ -46,2 +47,15 @@ ```javascript

To migrate down also add the following:
```javascript
grunt.registerTask('migrate:undo','revert and run the “down” action on the last run migration',function(file){
var done = this.async();
init(function(api){
api.sequelize.migrateUndo(function(){
done();
})
})
})
```
## [Associations](http://sequelizejs.com/docs/latest/associations)

@@ -48,0 +62,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc