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

Config option to remove TODO and Example in migration file? #171

Closed
aswinr2c opened this issue Feb 10, 2020 · 2 comments
Closed

Config option to remove TODO and Example in migration file? #171

aswinr2c opened this issue Feb 10, 2020 · 2 comments

Comments

@aswinr2c
Copy link

Is there a way to remove the comments (the TODO and Example) in every single migration?

module.exports = {
  async up(db, client) {
    // TODO write your migration here.  <=== Getting rid of this part
    // See https://github.com/seppevs/migrate-mongo/#creating-a-new-migration-script
    // Example:
    // await db.collection('albums').updateOne({artist: 'The Beatles'}, {$set: {blacklisted: true}});
  },

  async down(db, client) {
    // TODO write the statements to rollback your migration (if possible)  <=== Getting rid of this part
    // Example:
    // await db.collection('albums').updateOne({artist: 'The Beatles'}, {$set: {blacklisted: false}});
  }
};

@tennox
Copy link
Contributor

tennox commented Feb 14, 2020

See my PR #74 - it already provides a way to do this.

@seppevs
Copy link
Owner

seppevs commented Feb 23, 2020

I've merged PR #74, so you can now override the sample migration. Closing this.

@seppevs seppevs closed this as completed Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants