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

east

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

east - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

26

lib/migrator.js

@@ -42,3 +42,3 @@ 'use strict';

var defaultConfigPath = path.resolve('.eastrc');
configPath = fs.existsSync(defaultConfigPath) ? defaultConfigPath : '';
configPath = fs.existsSync(defaultConfigPath) ? defaultConfigPath : '';
}

@@ -314,6 +314,22 @@ if (!configPath) return {};

migration[action], function(err) {
if (err) {callback(err); return; }
self.adapter[action == 'migrate' ? 'markExecuted' : 'unmarkExecuted'](
migration.name, callback
);
if (err) { callback(err); return; }
if (migration.force) {
self.adapter.getExecutedMigrationNames(function(err, executedNames) {
if (err) { callback(err); return; }
var isExecuted = executedNames.indexOf(migration.name) != -1;
if (action == 'migrate' && !isExecuted) {
self.adapter.markExecuted(migration.name, callback);
} else if (action == 'rollback' && isExecuted) {
self.adapter.unmarkExecuted(migration.name, callback);
} else {
callback();
}
});
} else {
self.adapter[action == 'migrate' ? 'markExecuted' : 'unmarkExecuted'](
migration.name, callback
);
}
}

@@ -320,0 +336,0 @@ );

2

package.json
{
"name": "east",
"description": "node.js database migration tool for mongodb, sqlite, postgres, mysql",
"version": "0.2.4",
"version": "0.2.5",
"author": "Oleg Korobenko <oleg.korobenko@gmail.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -245,9 +245,11 @@ # east

For writing your own adapter you should implement methods for connection,
mark transaction as executed, etc see details inside [built-in adapter](lib/adapter)
mark transaction as executed, etc see details inside [built-in adapter](lib/adapter.js)
and [other adapters](#adapters).
You also can run tests from current repository against your adapter:
1. Clone current repository
2. Create file `.eastrc` inside `test` directory with path and parameters for
* Clone current repository
* Create file `.eastrc` inside `test` directory with path and parameters for
your adapter e.g.
```js

@@ -260,7 +262,8 @@ {

```
3. Run `npm test` at root of the cloned repository.
* Run `npm test` at root of the cloned repository.
## License
MIT

Sorry, the diff of this file is not supported yet

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