%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/usr/local/lib/node_modules/node-mongoose-cli/templates/
Upload File :
Create Path :
Current File : //proc/self/root/usr/local/lib/node_modules/node-mongoose-cli/templates/migration.ejs

const mongoose = require('mongoose');
const db = require('../index');
'use strict';

module.exports = {
    up: function () {
        /*
            Add altering commands here.
            Return a promise to correctly handle asynchronicity.

            Example:

            return db.<%- name %>.updateMany({fieldExample: {$exists: false}}, {$set:{fieldExample: 'TEST_VALUE'}}, {multi: true})
        */
    },

    down: function () {
        /*
            Add reverting commands here.
            Return a promise to correctly handle asynchronicity.

            Example:

            return db.<%- name %>.updateMany({fieldExample: {$exists: true}}, {$unset:{fieldExample: 1}}, {multi: true})
        */
    }
};

Zerion Mini Shell 1.0