Skip to main content

Prisma Postgres

Prisma Postgres is a fully managed PostgreSQL database service designed for serverless applications.

Resources

Database

Creates and manages Prisma Postgres databases.
import { Project, Database } from "alchemy/prisma-postgres";

const project = await Project("my-app");
const database = await Database("my-database", {
  project: project
});

Props

project
Project | string
required
The project to create the database in. Can be a Project object or project ID string.
name
string
default:"${app}-${stage}-${id}"
The name of the database
region
string
The region to create the database in. Available regions:
  • us-east-1
  • us-west-1
  • eu-west-3
  • eu-central-1
  • ap-northeast-1
  • ap-southeast-1
delete
boolean
default:"false"
Whether to delete the database if the resource is deleted
serviceToken
Secret
The service token to use for the API

Returns

id
string
The Prisma ID of the database
name
string
The name of the database
status
'failure' | 'provisioning' | 'ready' | 'recovering'
The status of the database
region
string
The region of the database
createdAt
string
The timestamp of the database creation
project
string
The Prisma ID of the project the database belongs to

Build docs developers (and LLMs) love