Database & Prisma

Automate PostgreSQL schema migrations and seeding with Prisma.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/tachfineamnay/LumiraV2 --skill database-prisma-tachfineamnay
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database & Prisma
Source: https://github.com/tachfineamnay/LumiraV2/tree/main/skills/02-database
Command: npx skills add https://github.com/tachfineamnay/LumiraV2 --skill database-prisma-tachfineamnay

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams manage PostgreSQL databases efficiently by centralizing schema definitions with Prisma, enabling safe migrations and reproducible seed data.

Core Features & Use Cases

  • Migration-first workflow: Use strict Prisma migrations to evolve the schema safely across environments.
  • Type-safe data access: Generate Prisma client to enforce type safety across app layers.
  • Seeding and data initialization: Provide seed.ts for development and test data.
  • Use Case: When onboarding a new feature requiring schema changes and sample data, run migrations, generate the client, and seed the database.

Quick Start

Run migrations, generate the Prisma client, and seed data for development:

  • pnpm db:generate
  • pnpm db:migrate --name init
  • pnpm db:seed

Frequently Asked Questions about Database & Prisma

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate PostgreSQL schema migrations and database seeding with Prisma?

To automate PostgreSQL schema migrations and seeding with Prisma, you can use a centralized workflow that applies strict migrations, generates a type-safe Prisma client, and executes reproducible seed scripts across environments.

What is a migration-first workflow for PostgreSQL in TypeScript?

A migration-first PostgreSQL workflow in TypeScript uses strict Prisma migrations to evolve database schemas safely across environments, ensuring schema changes are tracked and applied reproducibly without data loss.

Do I need a specific directory structure to use Prisma migrations with PostgreSQL?

Yes, this Prisma migrations workflow requires your schema.prisma file to be located in the packages/database/prisma directory to correctly apply migrations, generate the client, and seed data.

How do I set up type-safe database queries and seed data in a TypeScript application?

You set up type-safe database queries and seed data by generating the Prisma client for type enforcement and executing a dedicated seed.ts script to initialize development and test data reproducibly.

What Prisma and PostgreSQL versions are required for safe schema migrations?

Safe schema migrations and type-safe queries require Prisma 5.x and PostgreSQL 16, ensuring compatibility for database generation, migration execution, and data seeding commands.