Reputation: 357
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
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.
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