Netlify Database
Skill Verified ActiveGuide for using Netlify Database — the GA managed Postgres product built into Netlify. Use when a project needs any kind of dynamic, structured, or relational data. Covers provisioning via @netlify/database, Drizzle ORM (@beta) setup, migrations, preview branching, and safe production data handling. Blobs is only for file/asset storage — any dynamic data belongs in the database.
To guide users in effectively using Netlify Database for dynamic, structured, and relational data within Netlify projects, ensuring correct setup and maintenance.
Features
- Managed Postgres provisioning via `@netlify/database`
- Drizzle ORM integration with `@beta` packages
- Automated schema migrations applied on deploy
- Netlify CLI commands for database operations
- Preview branching for isolated database testing
Use Cases
- Managing user-generated content like posts, comments, and orders
- Storing and querying structured application data
- Implementing relational data models within Netlify projects
- Handling dynamic data that grows or requires complex queries
Non-Goals
- Serving as a general-purpose Postgres administration tool outside of Netlify's managed environment
- Replacing Netlify Blobs for file and asset storage
- Providing a platform for non-Netlify hosted databases
Workflow
- Provision Netlify Database via `netlify database init` or package install
- Define schema in `db/schema.ts`
- Configure Drizzle Kit in `drizzle.config.ts`
- Generate migration files using `npm run db:generate`
- Test migrations locally with `npm run db:migrate`
- Commit schema and migration files for automatic deployment
Prerequisites
- Netlify CLI 26.0.0+
- Node.js environment
- Access to a Netlify project
Execution
- info:Pinned dependenciesWhile the SKILL.md specifies installation commands (e.g., `npm install drizzle-orm@beta`), it doesn't explicitly mention lockfiles for pinning versions of direct or transitive dependencies.
Installation
First, add the marketplace
/plugin marketplace add netlify/context-and-tools/plugin install context-and-tools@netlify-context-and-toolsQuality Score
VerifiedSimilar Extensions
Migrate Validate
100Validate pending migrations for foreign key consistency, rollback safety, and best practices
Neon Postgres
100Guides and best practices for working with Neon Serverless Postgres. Covers getting started, local development with Neon, choosing a connection method, Neon features, authentication (@neondatabase/auth), PostgREST-style data API (@neondatabase/neon-js), Neon CLI, and Neon's Platform API/SDKs. Use for any Neon-related questions.
Sql Optimization
100Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance.
DBHub Database Query Guide
100Guide for querying databases through DBHub MCP server. Use this skill whenever you need to explore database schemas, inspect tables, or run SQL queries via DBHub's MCP tools (search_objects, execute_sql). Activates on any database query task, schema exploration, data retrieval, or SQL execution through MCP — even if the user just says "check the database" or "find me some data." This skill ensures you follow the correct explore-first workflow instead of guessing table structures.
Dsql
100Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL migration, DDL operations, query plan explainability, and SQL compatibility validation. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow.
Migrate Create
99Create a new sequentially numbered database migration with up/down SQL files