Reputation: 81
How to create database using knex npm?
Here it is MYSQL query
create database 'test'
I want to convert this query using knex.
Upvotes: 2
Views: 1259
Reputation: 19718
There is no special API for creating DB in knex
, probably because knex
usually connects to already created DB and to be honest database creation is pretty rare operation.
Npm package knex-db-manager
(https://vincit.github.io/knex-db-manager/) can do also database maintenance tasks and has separate superuser and normal user connection.
Upvotes: 2