Skip to main content
For migrations to work you need to specify a migration folder in your :
tygress-client.ts

CLI

For the CLI to be able to use the PostgresClient you defined you can pass the path to it using --config ./src/database.ts or put the in tygress-client.ts in your project root.

Commands

db:create

Creates your database. Connects to postgres database with the auth provided in your config.

migration:generate Name

Generates a migration that will make your DB match your

migration:blank Name

Creates an empty migration

migration:run

Runs all pending migrations

migration:rollback

Rolls the last executed migration back