prisma

Manage PostgreSQL schemas, migrations, and queries with Prisma ORM.

83|12|Updated Oct 6, 2024
One-click install
npx skills add https://github.com/proyecto26/projectx --skill prisma-proyecto26
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma
Source: https://github.com/proyecto26/projectx/tree/main/.agents/skills/prisma
Command: npx skills add https://github.com/proyecto26/projectx --skill prisma-proyecto26

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @prisma/client, prisma, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies database interactions by providing tools and guidance for using the Prisma ORM with PostgreSQL, covering schema management, migrations, and querying.

Core Features & Use Cases

  • Database Schema Management: Define and manage your database schema using schema.prisma.
  • Migrations: Create, apply, and review database schema changes.
  • Querying & Data Operations: Perform CRUD operations, transactions, and raw SQL queries.
  • Use Case: When you need to add a new 'users' table to your PostgreSQL database, define its schema in schema.prisma, generate a migration, and then use the generated Prisma client to create new user records.

Quick Start

Use the prisma skill to generate the Prisma client after updating the database schema.

Frequently Asked Questions about prisma

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

FAQPage Schema
How do I manage database migrations with Prisma ORM in PostgreSQL?

Database migrations with Prisma ORM involve defining your schema in `schema.prisma`, generating a migration, and applying it to PostgreSQL. This Skill supports creating, applying, and reviewing schema changes, alongside seeding data and executing CRUD operations via a NestJS service.

Can I execute raw SQL queries using Prisma client?

Yes, you can execute raw SQL queries using Prisma client. This Skill provides raw SQL capabilities for advanced use cases, allowing you to bypass the standard ORM methods when you need complex database operations directly within your PostgreSQL database.

Does Prisma ORM support PostGIS geometry for PostgreSQL?

Yes, Prisma ORM supports PostGIS geometry. This Skill includes specific PostGIS geometry support, enabling you to manage spatial data within your PostgreSQL database alongside standard schema management and querying operations.

What is the best way to structure database operations in NestJS with Prisma?

The best way to structure database operations in NestJS with Prisma is using a repository pattern. This Skill implements a NestJS service and repository pattern to handle data operations, transactions, and CRUD functionalities systematically.

How do I define and update database schema using Prisma?

To define and update a database schema using Prisma, you modify the `schema.prisma` file to declare your models. After updating the database schema, you use the Prisma skill to generate the Prisma client and manage the new schema structure.