Skip to content

Commit

Permalink
feat: to allow config public for Migration model
Browse files Browse the repository at this point in the history
  • Loading branch information
andy2046 committed Jun 21, 2017
1 parent d0c26e6 commit 78b88c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The usage is based on the node-db-migrate project.

- `enableRest`

[Boolean] : A boolean indicating wether migrate/rollback REST api methods should be exposed on the Migration model. *(default: false)*
[Boolean] : A boolean indicating whether migrate/rollback REST api methods should be exposed on the Migration model. *(default: false)*

- `migrationsDir`

Expand All @@ -48,6 +48,10 @@ The usage is based on the node-db-migrate project.

[Array] : ACLs to apply to Migration and MigrationMap models. *(default: [])*

- `public`

[Boolean] : A boolean indicating whether Migration model should be exposed on the StrongLoop API Explorer. *(default: true)*


## Running Migrations

Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ module.exports = function(app, options) {
var Migration = require('./models/migration')(MigrationModel, options);
var MigrationMap = require('./models/migration-map')(MigrationMapModel, options);

app.model(Migration);
app.model(MigrationMap);
app.model(Migration, options);
app.model(MigrationMap, options);

if (!options.enableRest) {
if (Migration.disableRemoteMethodByName) {
Expand Down

0 comments on commit 78b88c6

Please sign in to comment.