Skip to main content

db infra

Manage infrastructure SQL (roles, schemas, extensions) from db/schema/infra/.

Usage

postkit db infra [--apply] [--target <target>]

<target>: local or remote

Options

OptionDescription
--applyApply infrastructure SQL
--targetTarget for apply: local or remote (default: local)
-v, --verboseEnable verbose output
--dry-runShow what would be done without making changes
--jsonOutput as JSON

Examples

# Show infra statements
postkit db infra

# Apply to local database
postkit db infra --apply

# Apply to remote database
postkit db infra --apply --target=remote

What It Does

Without --apply, displays the infrastructure SQL that would be run.

With --apply, executes the infrastructure SQL on the target database.

  • grants - Manage grant statements
  • seed - Manage seed data