Skip to main content
Version: Next

Interface: Db

Database configuration.

See Databases for seeding and Prisma client customization.

Properties

prismaSetupFn?

optional prismaSetupFn?: Reference<AnyFunction>

Function that sets up and returns a configured Prisma Client instance. Use this to add Prisma logging or client extensions.


seeds?

optional seeds?: Reference<AnyFunction>[]

Async functions runnable with wasp db seed [name] to populate the database with initial data. Each function receives Wasp's Prisma Client; the name passed to wasp db seed matches the function's identifier in the import.