You will need:
If you haven’t got postgres installed go do that — https://firstname.lastname@example.org/installing-postgresql-for-windows-7ec8145698e3#:~:text=Graphical%20Installer%3A%20Postgres.app,and%20database.&text=Mac%20users%2C%20you’re%20all%20set!
Using node make your project directory then install.
Once installed run.
Let’s make our model.
Using Sequelize we can connect to our Postgres server, create our database, migrate our models into the DB as tables.
Your config file should look like this.
Whenever you just interact with your model in your code it will by default choose development. Set your postgres username, password, database name, host IP & the dialect to ‘postgres’.
Note that the database does not exist in the postgres server at this point.
Save the file.
Aslong as you have done that correctly you can now run the following command.
Let’s make one more model before migrating our models.
Now let’s check first in postgres that our DB exists
Okay so it’s there.
Connect to your DB.
List any tables.
Let’s migrate our models.
Let’s check for tables in our DB again.
If you found this interesting then do check this out!
Solidity Dev Study Group — https://discord.gg/KzbcGmrnfN
-Polygon Alliance — https://www.polygonalliance.com/
-Polygon Alliance Discord — https://discord.gg/kJKPCGQu66
Did you enjoy this article?
Feel like buying me a cup of coffee?
Polygon/Eth/Bsc — 0x4A581E0eaf6b71D05905e8E6014dc0277A1B10ad
New to trading? Try crypto trading bots or copy trading on best crypto exchanges
Join Coinmonks Telegram Channel and Youtube Channel get daily Crypto News
- Free Crypto Signals | Crypto Trading Bots
- An ultimate guide to Leveraged Token
- 16 Best Folding Electric Bikes
- 28 Best Electric Bikes Review
- Top 3 Binance Futures Trading Bots
#Sequelize #Postgres #Part #ScruffyStudios #Coinmonks