What problem does it solve? Setting up and operating a managed Postgres database on Netlify involves provisioning, schema migrations, preview branching, and production data changes — each with failure modes that can corrupt migration history or touch the wrong database. This Skill encodes the supported workflows and guardrails so agents and developers avoid out-of-band changes, deprecated tooling, and unsafe direct connections. ## Core Features & Use Cases - Provisioning and CLI operations: Covers netlify database init, status, connect, migrations new/apply/pull/reset, and reset, with a preview-first deploy workflow and documented recovery for first-deploy provisioning failures. - Drizzle ORM integration: Guides schema definition in db/schema.ts, the drizzle-orm/netlify-db adapter (requiring the @beta dist-tag), and migration generation into netlify/database/migrations/ so deploys apply them automatically. - Safe production data handling: Enforces DML migrations for production data changes, expand-and-contract for breaking schema changes, and a phased provider-switch process from the legacy @netlify/neon extension or any external Postgres. - Use Case: A developer adds dynamic data to a Netlify site — the Skill walks them through installing @netlify/database, generating a timestamped migration, testing it locally with netlify database migrations apply, and shipping it via a preview deploy before promoting to production. ## Quick Start Ask the AI to set up Netlify Database with Drizzle for your project, defining a starter schema and generating the first migration for a preview deploy.