database

Define PostgreSQL and MongoDB schemas with migrations, indexes, and RLS.

25|10|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/neuron-one/GODMODE --skill database-neuron-one
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database
Source: https://github.com/neuron-one/GODMODE/tree/main/skills/development/database
Command: npx skills add https://github.com/neuron-one/GODMODE --skill database-neuron-one

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL and MongoDB design, migrations, and indexing guidance to ensure data integrity and scalable performance across applications.

Core Features & Use Cases

  • Schema design for PostgreSQL and MongoDB, including normalization and appropriate constraints.
  • Migrations with rollback, constraints, and safe upgrades for evolving schemas.
  • Indexing, query optimization, and security considerations (RLS) for scalable access.

Quick Start

Create a normalized PostgreSQL schema with UUID primary keys, created_at/updated_at timestamps, and indexes for common queries in a multi-tenant SaaS environment.

Frequently Asked Questions about database

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

FAQPage Schema
How do I design a PostgreSQL schema with UUID primary keys and multi-tenant row-level security?

To design a multi-tenant PostgreSQL schema, you normalize tables to 3NF using UUID primary keys and foreign-key constraints. You then apply row-level security (RLS) policies to isolate tenant data and ensure scalable, secure access across the application.

What is the best way to handle database migrations with rollback for evolving schemas?

Database schema migrations with rollback are handled by defining forward upgrade scripts and corresponding reverse scripts. This ensures safe schema evolution, maintains data integrity during updates, and allows immediate reversion if constraints or indexing changes cause issues.

How do I create an indexing strategy for PostgreSQL and MongoDB that ensures scalable performance?

An indexing strategy for PostgreSQL and MongoDB is created by analyzing common query patterns and adding targeted indexes. This ensures scalable performance by accelerating data retrieval while maintaining robust schema constraints and data integrity.

Can I use MongoDB schema design for normalized data and foreign-key constraints?

MongoDB schema design typically prioritizes flexible, embedded documents over strict 3NF normalization and foreign-key constraints used in PostgreSQL. However, you can enforce data integrity through validation rules and indexed references to structure relationships effectively.

When do I need created_at and updated_at timestamps in a database schema design?

You need created_at and updated_at timestamps in a database schema design to track record lifecycle events accurately. They are standard requirements for robust PostgreSQL schemas, supporting auditing, data synchronization, and temporal query filtering.

Why does adding row-level security to a multi-tenant database schema require specific constraints?

Adding row-level security to a multi-tenant database requires specific constraints to prevent data leakage between tenants. Establishing strict foreign-key constraints and normalized schemas ensures the RLS policies function correctly without compromising data integrity.