-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgraded mongoose version to support new mongo connection types
feat: .env support
- Loading branch information
Showing
8 changed files
with
2,981 additions
and
231 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
examples/config-file-usage/db/migrations/1450107140857-add-default-user-state.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
export async function up () { | ||
async function up () { | ||
await this('users').updateMany({}, { $set: { state: 'California' } }); | ||
} | ||
|
||
export async function down () { | ||
async function down () { | ||
await this('users').updateMany({}, { $unset: { state: 1 } }); | ||
} | ||
|
||
module.exports = { | ||
down, | ||
up | ||
} |
Oops, something went wrong.