Database Commands
The Velox TS CLI wraps Prisma’s migration commands with a consistent interface for checking status, running migrations, rolling back changes, and resetting your database during development.
Migrations
Section titled “Migrations”Check Status
Section titled “Check Status”velox migrate statusRun Migrations
Section titled “Run Migrations”velox migrate runRollback
Section titled “Rollback”velox migrate rollback # Last migrationvelox migrate rollback --steps=3 # Last 3 migrationsFresh Database
Section titled “Fresh Database”velox migrate fresh # Drop all + migratevelox migrate reset # Rollback all + migrateSeeding
Section titled “Seeding”Run All Seeders
Section titled “Run All Seeders”velox db:seedSpecific Seeder
Section titled “Specific Seeder”velox db:seed --seeder=usersFresh + Seed
Section titled “Fresh + Seed”velox db:seed --freshQuick Commands
Section titled “Quick Commands”For development, use Prisma directly:
pnpm db:push # Sync schema without migrationpnpm db:generate # Generate Prisma clientpnpm db:studio # Open Prisma StudioRelated Content
Section titled “Related Content”- Migrations - Migration patterns
- Seeding - Test data