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

remove unnecessary project dependencies, simplify promises and expose connection #84

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eddie-corrigall-ledn
Copy link

@eddie-corrigall-ledn eddie-corrigall-ledn commented Mar 20, 2023

Changes:

  • remove blueprint: use native promise and await/async
  • simplify this binding for up and down functions to be the Migration class instance, sharing control over the connection
  • update the docs to reflect changes
  • remove project scripts which have vulnerabilities, and are unnecessary

//
await this('user').create({ firstName: 'Ada', lastName: 'Lovelace' });
const User = getUserModel(this.connection);
await User.create({ firstName: 'Ada', lastName: 'Lovelace' });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively this line could be

const User = this.connection.collection('users).create({ firstName: 'Ada', lastName: 'Lovelace' });

@eddie-corrigall-ledn eddie-corrigall-ledn changed the title node 16 compatibility and cleanup remove unnecessary project dependencies, simplify promises and expose connection Mar 22, 2023
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

Successfully merging this pull request may close these issues.

1 participant