PostgreSQL
Updated on October 27, 2026
PostgreSQL
The recommended default engine for most relational applications.
Connection string
DATABASE_URL=postgresql://user:password@host:5432/dbname
# with SSL, if your client requires it
DATABASE_URL=postgresql://user:password@host:5432/dbname?sslmode=require
Prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
email String @unique
createdAt DateTime @default(now())
}
npx prisma migrate deploy
SQLAlchemy (Python)
from sqlalchemy import create_engine
engine = create_engine(os.environ["DATABASE_URL"])
Best practices
- Use the internal URL for connections from your application services. The public URL is reserved for administration tools.
- Put migrations in your deployment pipeline (
prisma migrate deploy,alembic upgrade head…) rather than running them by hand. - Index the columns used in your
WHEREandJOINclauses. Webgune does not do it on your behalf.