db-migrate / db-migrate-base

Base driver for db-migrate
Other
7 stars 16 forks source link

Support documented mysql promise based insert command. #13

Closed rgrwkmn closed 5 years ago

rgrwkmn commented 5 years ago

This updates the default DB insert command to match the documentation. Previously it seems that it was not updated to support promises like other DB commands were.

Mysql insert documentation

It doesn't note that the callback is optional, but in the Creating Migrations documentation it states that db-migrate upgraded to a promise-based API, and in other methods it states that the callback function is omitted if you wish to use the promise API. So that is how I expect all of the methods to work.

I'm making as few changes to the code as possible because this function is passed through directly by the mysql driver, called with 3 args in the nosql driver, and maybe more, so I'm trying to keep it backwards compatible.

tl:dr; Lots of justification for a really small change.

Note that the undocumented update method has a similar problem which I haven't fixed.

commitlint-wzrdtales[bot] commented 5 years ago

There were the following issues with this Pull Request

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

commitlint-wzrdtales[bot] commented 5 years ago

There were the following issues with this Pull Request

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

wzrdtales commented 5 years ago

Thank you for your contribution! :tada:

Please make sure to comply to the commit standards. Your commit needs to formatted in the angular convention. This allows us to automatically generate changelogs. Thank you.

For more information please read this document: https://github.com/conventional-changelog/conventional-changelog/tree/8fb86d39cc9bf9d54e4bf5135a87b15a7c02dc25/packages/conventional-changelog-angular

rgrwkmn commented 5 years ago

Thanks for calling that out, I couldn't tell what commitlint wanted me to do.

wzrdtales commented 5 years ago

When you click on details in the checks session, you get directed to the readme, this probably needs to be in the message as well. I will take care of that :)

wzrdtales commented 5 years ago

Here is the adjustment for reference https://github.com/db-migrate/db-migrate-base/commit/77bcc68633655f3868b8eaccc47b0262650791a9#diff-168726dbe96b3ce427e7fedce31bb0bcR401

rgrwkmn commented 5 years ago

Cool, thanks!