Skip to main content
AI Review uses PostgreSQL as its database. Schema migrations are managed with Drizzle ORM.

Configuration

Set the DATABASE_URL environment variable to your PostgreSQL connection string:
This is the only required database environment variable. The application connects using Drizzle’s PostgreSQL client.

Migration commands

Run migrations against the development database:
Or using the script directly:
The development environment does not prompt for confirmation before running.To push schema changes directly without generating a migration file (development only):
db:push overwrites the database schema without generating a migration history. Only use it in development environments.

Drizzle Studio

Open the Drizzle Studio GUI to inspect and manage the database:
This starts a local web interface connected to the database configured via DATABASE_URL.

Generating migrations

When you modify the Drizzle schema files, generate a new migration:
This creates a new migration file in the server’s migrations directory. Commit this file alongside your schema changes.

Development data directory

The development Docker Compose configuration stores PostgreSQL data in:
The full development data layout is:

Resetting the development environment

pnpm env:reset is a destructive operation. It deletes all local development containers, volumes, and the contents of ./data. This cannot be undone.
The script will prompt you to confirm before proceeding. After the reset, re-run pnpm env:init to restore the development environment and re-run migrations.