MigrateDownOptions interface

Everything migrateDown() needs: no globals and no environment are read.

Signature:

export interface MigrateDownOptions 

Properties

Property

Modifiers

Type

Description

databaseUrl

string

Postgres connection string for the database to roll back.

deleteFolder?

boolean

(Optional) Delete the migration folder after a successful rollback.

dryRun?

boolean

(Optional) Report the actions without changing anything.

generateOnly?

boolean

(Optional) Only (re)generate missing down.sql files; don't apply anything.

log?

(message: string) => void

(Optional) Progress reporter (defaults to a no-op — the core stays silent).

migrationsDir

string

Absolute path to the Prisma migrations directory.

projectRoot

string

Working directory for prisma migrate diff (holds prisma.config.ts).

steps?

number

(Optional) Number of most-recent applied migrations to roll back (default 1).

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.