Carl
Carl

Reputation: 357

Why can't i create db with mikro-orm?

so i'm trying to createdb in visualstudio code with mikro-orm and postgresql but there's an error:

createdb lireddit
The name "createdb" is not recognized as the name of a cmdlet, function, script file, or executable program. Check the spelling
name, as well as the presence and correctness of the path, and then try again.
+ createdb <<<<  lireddit
    + CategoryInfo          : ObjectNotFound: (createdb:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Before that i installed mikro-orm and postgresql with yarn, but it doesn't seem to work.

Upvotes: 0

Views: 867

Answers (1)

raja emani
raja emani

Reputation: 321

There is no option as mentioned in mikro-orm documentation to create a db using createdb mikro-orm docs .

The video you were following which led you here has setup some scripts or aliases in his bash_profile.sh and installed PG-CLI to do this locally to createdb using terminal.

Solution to how to do it the native way: The database wont be created by running createdb in terminal. First install postgresql server from EDB Installer site which gives all the tools to run your postgresql server and also a client called pgAdmin to interact with your postgresql server.

Once you have installed all the requirements. Open pgAdmin and create the data-base as shown in the image below. enter image description here

Incase you are having trouble ahead on how the migrations happen from your project to postgresql through mikro-orm, let me know. I can help

Upvotes: 1

Related Questions