database-postgres

Manage Postgres schemas, migrations, and RLS with Drizzle ORM.

4.6k|378|Updated Jun 28, 2024
One-click install
npx skills add https://github.com/latitude-dev/latitude-llm --skill database-postgres
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-postgres
Source: https://github.com/latitude-dev/latitude-llm/tree/main/.agents/skills/database-postgres
Command: npx skills add https://github.com/latitude-dev/latitude-llm --skill database-postgres

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Postgres integration with Drizzle ORM streamlines database schema, migrations, and access control across services, reducing boilerplate and drift between domain models and storage.

Core Features & Use Cases

  • Drizzle-based schema management and migrations
  • Row-level security (RLS) enforcement via SqlClient wiring
  • Repositories and toDomain/toInsertRow mappers
  • Psql / reset workflows for local and CI environments
  • Platform-agnostic boundaries with organization-scoped data access

Quick Start

Initialize the Postgres integration by applying the initial Drizzle schema and wiring SqlClient in your app.

Frequently Asked Questions about database-postgres

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

FAQPage Schema
How do I manage Postgres schema migrations with Drizzle ORM?

Postgres schema migrations with Drizzle ORM are managed by applying Drizzle-based schema definitions and utilizing standard Postgres tooling for local and CI environments. This streamlines schema evolution and reduces boilerplate across your app stack.

How do I enforce row-level security (RLS) in a Postgres application?

Row-level security (RLS) is enforced via SqlClient wiring that integrates RLS policies directly into your data access layer. This ensures platform-agnostic boundaries with organization-scoped data access across your repositories.

Can I use Drizzle ORM repositories to map domain models in Postgres?

Yes, Drizzle ORM repositories support mapping domain models in Postgres through toDomain and toInsertRow mappers. This reduces drift between domain logic and storage by standardizing data transformation across services.

Do I need existing Drizzle schemas to set up Postgres integration?

Yes, setting up this Postgres integration requires existing Drizzle-based schemas and defined RLS policies. You initialize the integration by applying the initial Drizzle schema and wiring the SqlClient within your application stack.

What is the best way to reset Postgres databases during local development?

Resetting Postgres databases during local development is handled through integrated psql and reset workflows. These standard Postgres tooling operations enable consistent database state management and migrations across local and CI environments.