Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: to allow config public for Migration model #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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