need postgres explanation
do I have to start my own server for my postgres database with user and password and run in alongside my next app to be able to connect to it with
?
2 Replies
i want to move from sqlite to posgresql. Previously I did not need to use anything at all and stored my dev
local.db
in the root folder, now with postgres things got complicated. I cannot use local.db
with postgres, or can I?Moving from SQLite to PostgreSQL involves a few changes, mainly because SQLite is a serverless database, while PostgreSQL requires a running server. Here’s a breakdown of what you need to know and do:
SQLite: Stores the entire database in a single file (e.g., local.db), which can be easily accessed and managed without needing a separate server. With SQLite you need a minimal setup, the SQLite library and a local file like {localdb} to use it
PostgreSQL: Requires a running server to manage databases. The data is stored in a more complex file structure managed by the server itself. Needs a server either local (you can install it) or with a remote provider like AWS, Heroku, ...