[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-netlify-netlify-database":3,"mdc--nw46cu-key":33,"related-org-netlify-netlify-database":5455,"related-repo-netlify-netlify-database":5627},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":31,"mdContent":32},"netlify-database","provision and manage Netlify Database","Guide 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\u002Fdatabase, Drizzle ORM (@beta) setup, migrations, preview branching, and safe production data handling. Blobs is only for file\u002Fasset storage — any dynamic data belongs in the database.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"netlify","Netlify","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnetlify.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Backend","backend","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Database","database",{"name":21,"slug":22,"type":15},"PostgreSQL","postgresql",24,"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Fcontext-and-tools","2026-07-20T05:58:58.934045",null,5,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":26},[],"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Fcontext-and-tools\u002Ftree\u002FHEAD\u002Fskills\u002Fnetlify-database","---\nname: netlify-database\ndescription: Guide 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\u002Fdatabase, Drizzle ORM (@beta) setup, migrations, preview branching, and safe production data handling. Blobs is only for file\u002Fasset storage — any dynamic data belongs in the database.\n---\n\n# Netlify Database\n\n**Netlify Database** is the managed Postgres product built into the Netlify platform. It is **GA** and is the default choice for any dynamic data in a Netlify project.\n\nInstall `@netlify\u002Fdatabase` and Netlify auto-provisions a Postgres database for the site at deploy time. Each deploy preview gets its own isolated branch forked from production data. No Neon account, connection-string wiring, or claim flow — the database is a first-class Netlify primitive.\n\n## Database vs Blobs\n\nUse **Netlify Database** for anything dynamic:\n\n- Any user-generated or app-generated records (posts, comments, orders, sessions, audit logs)\n- Structured data that will grow, be queried, or be joined\n- Key-value-style data read or written by application code at runtime\n\nUse **Netlify Blobs** only for **file and asset storage**: images, documents, exports, uploads, cached binary artifacts. Do not use Blobs as a dynamic data store — reach for Database instead. See `netlify-blobs\u002FSKILL.md`.\n\n## Before you build\n\nIf the prompt didn't already specify, ask the user a few short questions before scaffolding any database code — answers shape the schema, the seed data, and the query layer:\n\n- **What entities does the app need?** (Users, posts, orders, sessions — drives the schema in `db\u002Fschema.ts`.)\n- **Any seed data for the prototype?** (Test rows, default roles, sample content — these become a DML migration, not ad-hoc `INSERT`s against production.)\n- **Drizzle (recommended) or native driver?** (Drizzle for type-safe queries and generated migrations; native for raw SQL or a different query builder like Kysely.)\n\n**If you don't have preferences here, tell me roughly what the app does and I'll pick sensible defaults** — typically Drizzle with timestamp-prefix migrations and a starter schema for the entities the prompt implies.\n\n## CRITICAL: Install Drizzle from the `@beta` dist-tag\n\nThe Netlify Database adapter for Drizzle ORM currently only exists on the `beta` release line of `drizzle-orm`. Install **both** `drizzle-orm` and `drizzle-kit` from the `@beta` dist-tag:\n\n```bash\nnpm install drizzle-orm@beta\nnpm install -D drizzle-kit@beta\n```\n\nThe default `latest` versions do not include the `drizzle-orm\u002Fnetlify-db` adapter and will fail. If `drizzle-kit generate` errors about being outdated, or the `drizzle-orm\u002Fnetlify-db` import fails to resolve, the install is missing `@beta`.\n\nThe `@beta` tag only affects the installed version — imports are written as `drizzle-orm`, `drizzle-orm\u002Fpg-core`, and `drizzle-orm\u002Fnetlify-db` without modification.\n\n## CRITICAL: Use the Netlify CLI for database operations\n\nThe CLI ships a complete database surface under `netlify database` (alias: `netlify db`) that replaces hand-rolled scripts and direct API\u002FUI work. Reach for these commands first before writing custom tooling. **Requires Netlify CLI 26.0.0+** — if a `netlify database` subcommand isn't recognized, run `npm install -g netlify-cli@latest`.\n\nThe corollary: **never go around the CLI**, even for read-only work. Don't run `psql`\u002F`pg_dump` or any raw Postgres client (use `netlify database connect --query \"...\"`), don't curl `https:\u002F\u002Fapi.netlify.com\u002F...`, don't read auth tokens off disk for side-channel calls, and don't use `netlify api \u003Cmethod>` as a recovery hatch when provisioning fails — the supported recovery is under [If the first deploy fails to provision the database](#if-the-first-deploy-fails-to-provision-the-database).\n\nIf the documented happy path doesn't work, [surface the failure and stop](#when-something-fails-surface-and-stop) — don't escalate to lower-level tools. Full command reference is in [Netlify CLI commands](#netlify-cli-commands-for-netlify-database) below.\n\n## When something fails, surface and stop\n\nWhen a `netlify` command fails, a deploy fails to provision the database, or any documented happy path errors out, the right action is to **report the failure to the user** with the deploy log URL, the exact error, and the affected site\u002Fbranch — and stop. Do not invent recovery commands or escalate to lower-level tools.\n\nSpecific failure modes (like the first-deploy 401) get their own playbooks below. The general rule applies everywhere: a stuck agent surfacing context is far safer than one that wanders off.\n\n## CRITICAL: Never apply migrations to a Netlify-hosted database\n\nThe only database you ever apply migrations to yourself is the **local development DB**. For any Netlify-hosted database — production or a deploy preview branch — **Netlify applies migrations automatically during the deploy**. Your job is to create migration files and commit them. The deploy does the rest.\n\nThis means:\n\n- Use `netlify database migrations apply` for the local DB. Do NOT run `drizzle-kit migrate` against `NETLIFY_DB_URL` in any context.\n- Do NOT run `drizzle-kit push` at all. Generate a migration and let the deploy apply it.\n- Do NOT run raw DDL (`CREATE`, `ALTER`, `DROP`, `TRUNCATE`) via `netlify database connect`, `psql`, or any other direct connection. Schema changes go through migration files; out-of-band DDL drifts the migration history from the actual schema.\n- Do NOT export `NETLIFY_DB_URL` from a preview or production context and run a client against it. Migrations drift the moment anything touches the schema out-of-band.\n\nThe one documented exception is a **one-time data import** during a provider switch — see `references\u002Fmigration-from-extension.md`. Outside that specific flow, the rule is absolute: schema changes go through migration files, migration files get applied by the deploy.\n\n## Not the legacy \"Netlify DB\" extension\n\nThe older **Netlify DB** extension (Beta) is **deprecated**. It is a separate product and must not be confused with Netlify Database. Do not recommend or install it for new projects.\n\n| | Netlify Database (GA, recommended) | Netlify DB extension (deprecated Beta) |\n|---|---|---|\n| Package | `@netlify\u002Fdatabase` | `@netlify\u002Fneon` |\n| Env var | `NETLIFY_DB_URL` | `NETLIFY_DATABASE_URL` |\n| Setup | `netlify database init` or install the package — auto-provisioned at deploy | Historically `netlify db init` on older CLI versions, with a claim into the user's Neon account; that flow is no longer reachable from the current CLI |\n| Status | GA | Deprecated; new creation blocked as of April 2026 |\n\nIf an existing project is already using the `@netlify\u002Fneon` extension, keep it working and encourage the user to switch. See `references\u002Flegacy-extension.md` for recognition and coexistence, and `references\u002Fmigration-from-extension.md` for the full switching process (also covers switching from other external Postgres providers).\n\n## Provisioning\n\nThe fastest path is `netlify database init` — an interactive setup that installs `@netlify\u002Fdatabase`, lets the user pick Drizzle or raw SQL, writes `drizzle.config.ts` if needed, scaffolds a starter migration, applies it locally, and runs a sample query end-to-end:\n\n```bash\nnetlify database init           # interactive\nnetlify database init --yes     # accept defaults — for CI\u002Fagents\n```\n\nIf you'd rather wire things up by hand, install the package directly:\n\n```bash\nnpm install @netlify\u002Fdatabase\n```\n\nEither way, the presence of `@netlify\u002Fdatabase` in the dependency tree triggers provisioning on the next deploy. A database can also be created manually from the Netlify UI before first deploy, but the package + deploy path is the supported automation flow.\n\n### Provisioning workflow: preview-first\n\nThe supported inner loop is **preview-first**, not `--prod`-first:\n\n1. **First deploy: `netlify deploy`** (no `--prod`). This provisions the database if needed, applies any pending migrations to the production branch, and produces a draft URL. Verify the deploy log shows `Netlify Database setup completed in \u003Cn>s` (and, if migrations exist, `Loading migrations from netlify\u002Fdatabase\u002Fmigrations directory`) before continuing.\n2. **User verifies on the draft URL** — and completes any dashboard-only setup along the way (e.g., enabling Identity if the project also uses it; see `netlify-identity\u002FSKILL.md`).\n3. **Promote: `netlify deploy --prod`**.\n\nWhy preview-first matters: the preview deploy provisions the database and applies migrations exactly the way the production deploy will, so a failure during preview is recoverable without prod ever entering a half-configured state. `--prod`-first works in the happy case but is harder to recover from when something goes wrong.\n\n### If the first deploy fails to provision the database\n\n**Symptom:** the build (or the Netlify Database setup extension inside the build) fails with a `401 Access Denied` on `createSiteDatabase`, typically on the very first deploy of a brand-new site. The deploy log shows the failure inside the extension's setup step.\n\n**If the failure happened on `netlify deploy --prod` as the very first deploy**, the first thing to try is the supported preview-first flow — run `netlify deploy` (no `--prod`). The failure has only been observed on `--prod`-first attempts on brand-new sites.\n\n**If a preview deploy also fails — or the original failure was already on a preview — report the failure to the user and stop.** Do not work around it. Specifically, do not:\n\n- Curl `https:\u002F\u002Fapi.netlify.com\u002F...` directly\n- Run `netlify api createSiteDatabase` (or any other `netlify api` call to manually create what the platform was supposed to provision)\n- Pull auth tokens out of `~\u002FLibrary\u002FPreferences\u002Fnetlify\u002Fconfig.json`\n- Connect via `psql` to \"check on things\"\n\nThe recovery is to give the user the deploy log URL, the site URL, and the exact error, and let them decide what to do next (file a support issue, recreate the site, switch teams).\n\n## Drizzle ORM (recommended path)\n\nDrizzle is the recommended way to work with Netlify Database. Prefer Drizzle over writing raw SQL or hand-editing migration files — manual migrations are an edge case (see `references\u002Fmigrations.md`).\n\n### Install\n\n```bash\nnpm install @netlify\u002Fdatabase drizzle-orm@beta\nnpm install -D drizzle-kit@beta\n```\n\n### Schema file\n\nCreate `db\u002Fschema.ts`. Define all tables here using Drizzle's schema builder.\n\n```typescript\n\u002F\u002F db\u002Fschema.ts\nimport { boolean, pgTable, serial, text, timestamp, varchar } from \"drizzle-orm\u002Fpg-core\";\n\nexport const items = pgTable(\"items\", {\n  id: serial().primaryKey(),\n  title: varchar({ length: 255 }).notNull(),\n  description: text(),\n  isActive: boolean(\"is_active\").notNull().default(true),\n  createdAt: timestamp(\"created_at\").defaultNow(),\n  updatedAt: timestamp(\"updated_at\").defaultNow(),\n});\n\nexport type Item = typeof items.$inferSelect;\nexport type NewItem = typeof items.$inferInsert;\n```\n\nUse snake_case strings for column names (`\"is_active\"`, `\"created_at\"`) to match Postgres conventions. Drizzle variable names can be camelCase.\n\n### Drizzle client\n\nCreate `db\u002Findex.ts`. The adapter on `drizzle-orm\u002Fnetlify-db` picks the right driver for the runtime automatically.\n\n```typescript\n\u002F\u002F db\u002Findex.ts\nimport { drizzle } from \"drizzle-orm\u002Fnetlify-db\";\nimport * as schema from \".\u002Fschema\";\n\nexport const db = drizzle({ schema });\n```\n\nThe connection is configured automatically — no connection string needed. If your project uses native ESM with `.js` extensions on relative imports (`from \".\u002Fschema.js\"`), keep that style consistent here.\n\n### Drizzle Kit config\n\nCreate `drizzle.config.ts` at the project root. Set `out` to `netlify\u002Fdatabase\u002Fmigrations` — that's the directory the deploy applies migrations from:\n\n```typescript\n\u002F\u002F drizzle.config.ts\nimport { defineConfig } from \"drizzle-kit\";\n\nexport default defineConfig({\n  dialect: \"postgresql\",\n  schema: \".\u002Fdb\u002Fschema.ts\",\n  out: \"netlify\u002Fdatabase\u002Fmigrations\",\n});\n```\n\nNo `migrations` block is needed: `drizzle-kit generate` (the `@beta` line this skill pins) already defaults to timestamp prefixes, which keep filenames unique when branches generate migrations in parallel. Setting `migrations: { prefix: \"timestamp\" }` explicitly is harmless but redundant — and forcing a sequential `prefix: \"index\"` is what causes the parallel-branch collisions, so don't.\n\n### Package scripts\n\n```json\n{\n  \"scripts\": {\n    \"db:generate\": \"drizzle-kit generate\",\n    \"db:migrate\": \"netlify database migrations apply\"\n  }\n}\n```\n\n- `db:generate` writes a new migration file under `netlify\u002Fdatabase\u002Fmigrations\u002F` from the current schema.\n- `db:migrate` applies pending migrations to the **local development database only**, via the CLI. Hosted migrations (preview branches, production) are applied by the deploy — never by this script.\n\n### Schema-change workflow\n\n1. Edit `db\u002Fschema.ts`.\n2. `npm run db:generate` — writes a new file into `netlify\u002Fdatabase\u002Fmigrations\u002F`.\n3. Review the SQL.\n4. `npm run db:migrate` — applies it to the local development DB for testing.\n5. Commit the schema change and migration file together and push. The deploy applies the migration to the preview branch, then to production on publish.\n\n### Query patterns\n\n```typescript\nimport { db } from \".\u002Fdb\";\nimport { items } from \".\u002Fdb\u002Fschema\";\nimport { eq, desc } from \"drizzle-orm\";\n\n\u002F\u002F Select all\nconst all = await db.select().from(items);\n\n\u002F\u002F Select with condition\nconst [one] = await db.select().from(items).where(eq(items.id, id)).limit(1);\n\n\u002F\u002F Ordering and limit\nconst recent = await db.select().from(items).orderBy(desc(items.createdAt)).limit(10);\n\n\u002F\u002F Insert\nconst [created] = await db.insert(items).values({ title: \"New\" }).returning();\n\n\u002F\u002F Update\nconst [updated] = await db.update(items).set({ title: \"Updated\" }).where(eq(items.id, id)).returning();\n\n\u002F\u002F Delete\nawait db.delete(items).where(eq(items.id, id));\n```\n\nFull migration workflow, expand-and-contract for breaking schema changes, and production DML migrations are in `references\u002Fmigrations.md`.\n\n## Native driver (when Drizzle isn't a fit)\n\nWhen a project wants raw SQL, uses a different query builder (Kysely, etc.), or has a library that needs a `pg.Pool`, use the native driver exposed by `@netlify\u002Fdatabase`.\n\n```bash\nnpm install @netlify\u002Fdatabase\n```\n\n```typescript\nimport { getDatabase } from \"@netlify\u002Fdatabase\";\n\nconst db = getDatabase();\n\n\u002F\u002F Tagged template — parameters are safely bound, not interpolated\nconst users = await db.sql`SELECT * FROM users WHERE active = ${true}`;\n\n\u002F\u002F Insert with RETURNING\nconst [user] = await db.sql`\n  INSERT INTO users (name, email)\n  VALUES (${name}, ${email})\n  RETURNING *\n`;\n\n\u002F\u002F Bulk insert\nconst rows = db.sql.values([\n  [\"Ada\", \"ada@example.com\"],\n  [\"Bob\", \"bob@example.com\"],\n]);\nawait db.sql`INSERT INTO users (name, email) VALUES ${rows}`;\n```\n\nTransactions go through `db.pool` so `BEGIN`, the queries, and `COMMIT`\u002F`ROLLBACK` all run on the same connection:\n\n```typescript\nimport { getDatabase } from \"@netlify\u002Fdatabase\";\n\nconst db = getDatabase();\nconst client = await db.pool.connect();\ntry {\n  await client.query(\"BEGIN\");\n  await client.query(\"INSERT INTO users (name, email) VALUES ($1, $2)\", [name, email]);\n  await client.query(\"INSERT INTO posts (author_id, title) VALUES ($1, $2)\", [id, title]);\n  await client.query(\"COMMIT\");\n} catch (e) {\n  await client.query(\"ROLLBACK\");\n  throw e;\n} finally {\n  client.release();\n}\n```\n\nFor third-party tools that need a raw connection string, import `getConnectionString` from `@netlify\u002Fdatabase` — but prefer `getDatabase()` for application code.\n\n### Manual migrations\n\nWith the native driver, scaffold migration files via the CLI:\n\n```bash\nnetlify database migrations new -d \"create users table\"\n```\n\nThis creates `netlify\u002Fdatabase\u002Fmigrations\u002F\u003Cprefix>_\u003Cslug>\u002Fmigration.sql` and prompts for the numbering scheme if it can't be detected from existing files. Open the file and write the SQL. The CLI auto-detects an existing scheme; for new projects it'll ask — choose `timestamp` unless you have a reason not to.\n\nYou can also write the file by hand if you prefer. Two layouts are supported:\n\n- **Flat:** `netlify\u002Fdatabase\u002Fmigrations\u002F\u003Cprefix>_\u003Cslug>.sql`\n- **Subdirectory:** `netlify\u002Fdatabase\u002Fmigrations\u002F\u003Cprefix>_\u003Cslug>\u002Fmigration.sql` (what `migrations new` produces)\n\nIn both, `\u003Cprefix>` is digits (timestamp like `20260417143022` or sequential like `0001`) and `\u003Cslug>` is lowercase letters, numbers, hyphens, or underscores. Files apply in lexicographic order. See `references\u002Fmigrations.md`.\n\nOnce a migration has been applied to any database, never modify it — roll forward with a new migration instead.\n\n## Connection — don't reach for the env var\n\n`NETLIFY_DB_URL` is set automatically across builds, functions, edge functions, and local dev. Use the `getDatabase()` \u002F `getConnectionString()` helpers above rather than reading it directly — only reach for the raw env var for third-party tools that demand a bare string.\n\n`NETLIFY_DB_URL` is intentionally different from the legacy extension's `NETLIFY_DATABASE_URL`. The two coexist so a project mid-migration doesn't break. Don't rename between them.\n\n## Preview branching\n\nEach deploy preview runs against its own database branch forked from production data — schema and data changes in a preview don't affect production until the branch is merged and published. Migrations run against the preview branch first (failures fail the preview, not production), and ad-hoc preview edits (UI data browser or a direct client) don't propagate to production — always express production changes as migrations.\n\n## Changing existing data — production or preview?\n\nA request to change existing data — \"rename this category\", \"fix the broken row for user X\" — is **ambiguous about where it should land**: production, or only the current preview branch. Resolve that fork *before* changing anything: if the prompt didn't say, ask. When acting on someone's behalf, default to **not** touching production unless they explicitly asked.\n\nOnce it's production-bound, express it as a **DML migration**, never a direct write:\n\n- **Don't run the `UPDATE`\u002F`INSERT`\u002F`DELETE` against production** (or ad-hoc in a preview). Generate a DML migration in `netlify\u002Fdatabase\u002Fmigrations\u002F` (raw SQL or Drizzle-generated) and commit it — the deploy applies it, like a schema migration.\n- Tell the user you created a data migration; merging the branch applies it to production. Have them **verify in the deploy preview first** (it runs against a forked copy of production data).\n\nCovers seed data, backfills, cleanups, CSV imports, and single-row fixes. Full detail in `references\u002Fmigrations.md`.\n\n## Netlify CLI commands for Netlify Database\n\nThe CLI ships a complete database surface under `netlify database` (alias: `netlify db`). Requires CLI 26.0.0+. Most commands accept `--json` for machine-readable output — useful when scripting or reading results from an agent.\n\nFull per-command reference — `init`, `status`, `connect`, `migrations new` \u002F `apply` \u002F `pull` \u002F `reset`, and `reset` — is in `references\u002Fcli-commands.md`. The one rule that applies across all of them: **never run DDL (`CREATE`\u002F`ALTER`\u002F`DROP`\u002F`TRUNCATE`) through `connect`, `psql`, or any direct connection** — schema changes go through migration files.\n\n## Iterating on migrations\n\nWhen a migration you generated needs to change, what you do depends on whether it's been applied anywhere yet:\n\n- **Already applied** to any database (local dev DB, a preview branch, or production) → treat as immutable. Roll forward with a new migration that applies the correction.\n- **Only on disk** (not yet applied anywhere) → don't edit the SQL or snapshot files by hand. Run `netlify database migrations reset`, update `db\u002Fschema.ts`, then re-run `npm run db:generate`. Hand-editing desyncs Drizzle Kit's internal state and tends to produce broken migrations on the next generate.\n\n## Local development\n\n`netlify dev` runs against a local Postgres-compatible database — no remote connection, no risk to production. The local DB is the only one you migrate yourself (`netlify database migrations apply`).\n\n## Common mistakes\n\n1. **Missing `@beta`** — `drizzle-orm`\u002F`drizzle-kit` must be `@beta`; `latest` lacks the `drizzle-orm\u002Fnetlify-db` adapter.\n2. **Wrong output dir** — set `out: \"netlify\u002Fdatabase\u002Fmigrations\"` in `drizzle.config.ts`; migrations elsewhere aren't applied by the deploy.\n3. **Self-applying hosted migrations** — never `drizzle-kit migrate`\u002F`push` or DDL via `connect` against production\u002Fpreview; commit migration files and let the deploy apply them.\n\n## References\n\n- [Migrations](references\u002Fmigrations.md) — full migration workflow, expand-and-contract for breaking changes, and production DML\n- [CLI commands](references\u002Fcli-commands.md) — `init`, `status`, `connect`, and `migrations new` \u002F `apply` \u002F `pull` \u002F `reset`\n- [Local development](references\u002Flocal-dev.md) — running against a local Postgres-compatible database with `netlify dev`\n- [Operational footguns](references\u002Foperational-footguns.md) — client reuse, cold starts, preview-data (PII) exposure, legacy-extension deletion\n- [Legacy `@netlify\u002Fneon` extension](references\u002Flegacy-extension.md) — recognizing and coexisting with the older extension\n- [Migrating from the extension](references\u002Fmigration-from-extension.md) — switching from `@netlify\u002Fneon` or other external Postgres, including the one-time data import\n",{"data":34,"body":35},{"name":4,"description":6},{"type":36,"children":37},"root",[38,46,64,78,85,96,116,142,148,153,202,212,226,276,332,374,408,414,456,516,537,543,562,567,573,592,597,701,721,727,746,876,903,909,936,991,996,1019,1031,1038,1058,1134,1146,1151,1177,1214,1224,1283,1288,1294,1306,1312,1358,1364,1376,1988,2008,2014,2033,2187,2208,2214,2241,2428,2471,2477,2604,2642,2648,2700,2706,3542,3553,3559,3578,3599,4090,4126,4615,4643,4649,4654,4700,4721,4726,4768,4811,4816,4822,4847,4864,4870,4875,4881,4908,4920,4973,4984,4990,5015,5127,5133,5138,5183,5189,5206,5212,5320,5326,5449],{"type":39,"tag":40,"props":41,"children":42},"element","h1",{"id":4},[43],{"type":44,"value":45},"text","Netlify Database",{"type":39,"tag":47,"props":48,"children":49},"p",{},[50,55,57,62],{"type":39,"tag":51,"props":52,"children":53},"strong",{},[54],{"type":44,"value":45},{"type":44,"value":56}," is the managed Postgres product built into the Netlify platform. It is ",{"type":39,"tag":51,"props":58,"children":59},{},[60],{"type":44,"value":61},"GA",{"type":44,"value":63}," and is the default choice for any dynamic data in a Netlify project.",{"type":39,"tag":47,"props":65,"children":66},{},[67,69,76],{"type":44,"value":68},"Install ",{"type":39,"tag":70,"props":71,"children":73},"code",{"className":72},[],[74],{"type":44,"value":75},"@netlify\u002Fdatabase",{"type":44,"value":77}," and Netlify auto-provisions a Postgres database for the site at deploy time. Each deploy preview gets its own isolated branch forked from production data. No Neon account, connection-string wiring, or claim flow — the database is a first-class Netlify primitive.",{"type":39,"tag":79,"props":80,"children":82},"h2",{"id":81},"database-vs-blobs",[83],{"type":44,"value":84},"Database vs Blobs",{"type":39,"tag":47,"props":86,"children":87},{},[88,90,94],{"type":44,"value":89},"Use ",{"type":39,"tag":51,"props":91,"children":92},{},[93],{"type":44,"value":45},{"type":44,"value":95}," for anything dynamic:",{"type":39,"tag":97,"props":98,"children":99},"ul",{},[100,106,111],{"type":39,"tag":101,"props":102,"children":103},"li",{},[104],{"type":44,"value":105},"Any user-generated or app-generated records (posts, comments, orders, sessions, audit logs)",{"type":39,"tag":101,"props":107,"children":108},{},[109],{"type":44,"value":110},"Structured data that will grow, be queried, or be joined",{"type":39,"tag":101,"props":112,"children":113},{},[114],{"type":44,"value":115},"Key-value-style data read or written by application code at runtime",{"type":39,"tag":47,"props":117,"children":118},{},[119,120,125,127,132,134,140],{"type":44,"value":89},{"type":39,"tag":51,"props":121,"children":122},{},[123],{"type":44,"value":124},"Netlify Blobs",{"type":44,"value":126}," only for ",{"type":39,"tag":51,"props":128,"children":129},{},[130],{"type":44,"value":131},"file and asset storage",{"type":44,"value":133},": images, documents, exports, uploads, cached binary artifacts. Do not use Blobs as a dynamic data store — reach for Database instead. See ",{"type":39,"tag":70,"props":135,"children":137},{"className":136},[],[138],{"type":44,"value":139},"netlify-blobs\u002FSKILL.md",{"type":44,"value":141},".",{"type":39,"tag":79,"props":143,"children":145},{"id":144},"before-you-build",[146],{"type":44,"value":147},"Before you build",{"type":39,"tag":47,"props":149,"children":150},{},[151],{"type":44,"value":152},"If the prompt didn't already specify, ask the user a few short questions before scaffolding any database code — answers shape the schema, the seed data, and the query layer:",{"type":39,"tag":97,"props":154,"children":155},{},[156,174,192],{"type":39,"tag":101,"props":157,"children":158},{},[159,164,166,172],{"type":39,"tag":51,"props":160,"children":161},{},[162],{"type":44,"value":163},"What entities does the app need?",{"type":44,"value":165}," (Users, posts, orders, sessions — drives the schema in ",{"type":39,"tag":70,"props":167,"children":169},{"className":168},[],[170],{"type":44,"value":171},"db\u002Fschema.ts",{"type":44,"value":173},".)",{"type":39,"tag":101,"props":175,"children":176},{},[177,182,184,190],{"type":39,"tag":51,"props":178,"children":179},{},[180],{"type":44,"value":181},"Any seed data for the prototype?",{"type":44,"value":183}," (Test rows, default roles, sample content — these become a DML migration, not ad-hoc ",{"type":39,"tag":70,"props":185,"children":187},{"className":186},[],[188],{"type":44,"value":189},"INSERT",{"type":44,"value":191},"s against production.)",{"type":39,"tag":101,"props":193,"children":194},{},[195,200],{"type":39,"tag":51,"props":196,"children":197},{},[198],{"type":44,"value":199},"Drizzle (recommended) or native driver?",{"type":44,"value":201}," (Drizzle for type-safe queries and generated migrations; native for raw SQL or a different query builder like Kysely.)",{"type":39,"tag":47,"props":203,"children":204},{},[205,210],{"type":39,"tag":51,"props":206,"children":207},{},[208],{"type":44,"value":209},"If you don't have preferences here, tell me roughly what the app does and I'll pick sensible defaults",{"type":44,"value":211}," — typically Drizzle with timestamp-prefix migrations and a starter schema for the entities the prompt implies.",{"type":39,"tag":79,"props":213,"children":215},{"id":214},"critical-install-drizzle-from-the-beta-dist-tag",[216,218,224],{"type":44,"value":217},"CRITICAL: Install Drizzle from the ",{"type":39,"tag":70,"props":219,"children":221},{"className":220},[],[222],{"type":44,"value":223},"@beta",{"type":44,"value":225}," dist-tag",{"type":39,"tag":47,"props":227,"children":228},{},[229,231,237,239,245,247,252,254,259,261,267,269,274],{"type":44,"value":230},"The Netlify Database adapter for Drizzle ORM currently only exists on the ",{"type":39,"tag":70,"props":232,"children":234},{"className":233},[],[235],{"type":44,"value":236},"beta",{"type":44,"value":238}," release line of ",{"type":39,"tag":70,"props":240,"children":242},{"className":241},[],[243],{"type":44,"value":244},"drizzle-orm",{"type":44,"value":246},". Install ",{"type":39,"tag":51,"props":248,"children":249},{},[250],{"type":44,"value":251},"both",{"type":44,"value":253}," ",{"type":39,"tag":70,"props":255,"children":257},{"className":256},[],[258],{"type":44,"value":244},{"type":44,"value":260}," and ",{"type":39,"tag":70,"props":262,"children":264},{"className":263},[],[265],{"type":44,"value":266},"drizzle-kit",{"type":44,"value":268}," from the ",{"type":39,"tag":70,"props":270,"children":272},{"className":271},[],[273],{"type":44,"value":223},{"type":44,"value":275}," dist-tag:",{"type":39,"tag":277,"props":278,"children":283},"pre",{"className":279,"code":280,"language":281,"meta":282,"style":282},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install drizzle-orm@beta\nnpm install -D drizzle-kit@beta\n","bash","",[284],{"type":39,"tag":70,"props":285,"children":286},{"__ignoreMap":282},[287,310],{"type":39,"tag":288,"props":289,"children":292},"span",{"class":290,"line":291},"line",1,[293,299,305],{"type":39,"tag":288,"props":294,"children":296},{"style":295},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[297],{"type":44,"value":298},"npm",{"type":39,"tag":288,"props":300,"children":302},{"style":301},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[303],{"type":44,"value":304}," install",{"type":39,"tag":288,"props":306,"children":307},{"style":301},[308],{"type":44,"value":309}," drizzle-orm@beta\n",{"type":39,"tag":288,"props":311,"children":313},{"class":290,"line":312},2,[314,318,322,327],{"type":39,"tag":288,"props":315,"children":316},{"style":295},[317],{"type":44,"value":298},{"type":39,"tag":288,"props":319,"children":320},{"style":301},[321],{"type":44,"value":304},{"type":39,"tag":288,"props":323,"children":324},{"style":301},[325],{"type":44,"value":326}," -D",{"type":39,"tag":288,"props":328,"children":329},{"style":301},[330],{"type":44,"value":331}," drizzle-kit@beta\n",{"type":39,"tag":47,"props":333,"children":334},{},[335,337,343,345,351,353,359,361,366,368,373],{"type":44,"value":336},"The default ",{"type":39,"tag":70,"props":338,"children":340},{"className":339},[],[341],{"type":44,"value":342},"latest",{"type":44,"value":344}," versions do not include the ",{"type":39,"tag":70,"props":346,"children":348},{"className":347},[],[349],{"type":44,"value":350},"drizzle-orm\u002Fnetlify-db",{"type":44,"value":352}," adapter and will fail. If ",{"type":39,"tag":70,"props":354,"children":356},{"className":355},[],[357],{"type":44,"value":358},"drizzle-kit generate",{"type":44,"value":360}," errors about being outdated, or the ",{"type":39,"tag":70,"props":362,"children":364},{"className":363},[],[365],{"type":44,"value":350},{"type":44,"value":367}," import fails to resolve, the install is missing ",{"type":39,"tag":70,"props":369,"children":371},{"className":370},[],[372],{"type":44,"value":223},{"type":44,"value":141},{"type":39,"tag":47,"props":375,"children":376},{},[377,379,384,386,391,393,399,401,406],{"type":44,"value":378},"The ",{"type":39,"tag":70,"props":380,"children":382},{"className":381},[],[383],{"type":44,"value":223},{"type":44,"value":385}," tag only affects the installed version — imports are written as ",{"type":39,"tag":70,"props":387,"children":389},{"className":388},[],[390],{"type":44,"value":244},{"type":44,"value":392},", ",{"type":39,"tag":70,"props":394,"children":396},{"className":395},[],[397],{"type":44,"value":398},"drizzle-orm\u002Fpg-core",{"type":44,"value":400},", and ",{"type":39,"tag":70,"props":402,"children":404},{"className":403},[],[405],{"type":44,"value":350},{"type":44,"value":407}," without modification.",{"type":39,"tag":79,"props":409,"children":411},{"id":410},"critical-use-the-netlify-cli-for-database-operations",[412],{"type":44,"value":413},"CRITICAL: Use the Netlify CLI for database operations",{"type":39,"tag":47,"props":415,"children":416},{},[417,419,425,427,433,435,440,442,447,449,455],{"type":44,"value":418},"The CLI ships a complete database surface under ",{"type":39,"tag":70,"props":420,"children":422},{"className":421},[],[423],{"type":44,"value":424},"netlify database",{"type":44,"value":426}," (alias: ",{"type":39,"tag":70,"props":428,"children":430},{"className":429},[],[431],{"type":44,"value":432},"netlify db",{"type":44,"value":434},") that replaces hand-rolled scripts and direct API\u002FUI work. Reach for these commands first before writing custom tooling. ",{"type":39,"tag":51,"props":436,"children":437},{},[438],{"type":44,"value":439},"Requires Netlify CLI 26.0.0+",{"type":44,"value":441}," — if a ",{"type":39,"tag":70,"props":443,"children":445},{"className":444},[],[446],{"type":44,"value":424},{"type":44,"value":448}," subcommand isn't recognized, run ",{"type":39,"tag":70,"props":450,"children":452},{"className":451},[],[453],{"type":44,"value":454},"npm install -g netlify-cli@latest",{"type":44,"value":141},{"type":39,"tag":47,"props":457,"children":458},{},[459,461,466,468,474,476,482,484,490,492,498,500,506,508,515],{"type":44,"value":460},"The corollary: ",{"type":39,"tag":51,"props":462,"children":463},{},[464],{"type":44,"value":465},"never go around the CLI",{"type":44,"value":467},", even for read-only work. Don't run ",{"type":39,"tag":70,"props":469,"children":471},{"className":470},[],[472],{"type":44,"value":473},"psql",{"type":44,"value":475},"\u002F",{"type":39,"tag":70,"props":477,"children":479},{"className":478},[],[480],{"type":44,"value":481},"pg_dump",{"type":44,"value":483}," or any raw Postgres client (use ",{"type":39,"tag":70,"props":485,"children":487},{"className":486},[],[488],{"type":44,"value":489},"netlify database connect --query \"...\"",{"type":44,"value":491},"), don't curl ",{"type":39,"tag":70,"props":493,"children":495},{"className":494},[],[496],{"type":44,"value":497},"https:\u002F\u002Fapi.netlify.com\u002F...",{"type":44,"value":499},", don't read auth tokens off disk for side-channel calls, and don't use ",{"type":39,"tag":70,"props":501,"children":503},{"className":502},[],[504],{"type":44,"value":505},"netlify api \u003Cmethod>",{"type":44,"value":507}," as a recovery hatch when provisioning fails — the supported recovery is under ",{"type":39,"tag":509,"props":510,"children":512},"a",{"href":511},"#if-the-first-deploy-fails-to-provision-the-database",[513],{"type":44,"value":514},"If the first deploy fails to provision the database",{"type":44,"value":141},{"type":39,"tag":47,"props":517,"children":518},{},[519,521,527,529,535],{"type":44,"value":520},"If the documented happy path doesn't work, ",{"type":39,"tag":509,"props":522,"children":524},{"href":523},"#when-something-fails-surface-and-stop",[525],{"type":44,"value":526},"surface the failure and stop",{"type":44,"value":528}," — don't escalate to lower-level tools. Full command reference is in ",{"type":39,"tag":509,"props":530,"children":532},{"href":531},"#netlify-cli-commands-for-netlify-database",[533],{"type":44,"value":534},"Netlify CLI commands",{"type":44,"value":536}," below.",{"type":39,"tag":79,"props":538,"children":540},{"id":539},"when-something-fails-surface-and-stop",[541],{"type":44,"value":542},"When something fails, surface and stop",{"type":39,"tag":47,"props":544,"children":545},{},[546,548,553,555,560],{"type":44,"value":547},"When a ",{"type":39,"tag":70,"props":549,"children":551},{"className":550},[],[552],{"type":44,"value":8},{"type":44,"value":554}," command fails, a deploy fails to provision the database, or any documented happy path errors out, the right action is to ",{"type":39,"tag":51,"props":556,"children":557},{},[558],{"type":44,"value":559},"report the failure to the user",{"type":44,"value":561}," with the deploy log URL, the exact error, and the affected site\u002Fbranch — and stop. Do not invent recovery commands or escalate to lower-level tools.",{"type":39,"tag":47,"props":563,"children":564},{},[565],{"type":44,"value":566},"Specific failure modes (like the first-deploy 401) get their own playbooks below. The general rule applies everywhere: a stuck agent surfacing context is far safer than one that wanders off.",{"type":39,"tag":79,"props":568,"children":570},{"id":569},"critical-never-apply-migrations-to-a-netlify-hosted-database",[571],{"type":44,"value":572},"CRITICAL: Never apply migrations to a Netlify-hosted database",{"type":39,"tag":47,"props":574,"children":575},{},[576,578,583,585,590],{"type":44,"value":577},"The only database you ever apply migrations to yourself is the ",{"type":39,"tag":51,"props":579,"children":580},{},[581],{"type":44,"value":582},"local development DB",{"type":44,"value":584},". For any Netlify-hosted database — production or a deploy preview branch — ",{"type":39,"tag":51,"props":586,"children":587},{},[588],{"type":44,"value":589},"Netlify applies migrations automatically during the deploy",{"type":44,"value":591},". Your job is to create migration files and commit them. The deploy does the rest.",{"type":39,"tag":47,"props":593,"children":594},{},[595],{"type":44,"value":596},"This means:",{"type":39,"tag":97,"props":598,"children":599},{},[600,628,641,689],{"type":39,"tag":101,"props":601,"children":602},{},[603,604,610,612,618,620,626],{"type":44,"value":89},{"type":39,"tag":70,"props":605,"children":607},{"className":606},[],[608],{"type":44,"value":609},"netlify database migrations apply",{"type":44,"value":611}," for the local DB. Do NOT run ",{"type":39,"tag":70,"props":613,"children":615},{"className":614},[],[616],{"type":44,"value":617},"drizzle-kit migrate",{"type":44,"value":619}," against ",{"type":39,"tag":70,"props":621,"children":623},{"className":622},[],[624],{"type":44,"value":625},"NETLIFY_DB_URL",{"type":44,"value":627}," in any context.",{"type":39,"tag":101,"props":629,"children":630},{},[631,633,639],{"type":44,"value":632},"Do NOT run ",{"type":39,"tag":70,"props":634,"children":636},{"className":635},[],[637],{"type":44,"value":638},"drizzle-kit push",{"type":44,"value":640}," at all. Generate a migration and let the deploy apply it.",{"type":39,"tag":101,"props":642,"children":643},{},[644,646,652,653,659,660,666,667,673,675,681,682,687],{"type":44,"value":645},"Do NOT run raw DDL (",{"type":39,"tag":70,"props":647,"children":649},{"className":648},[],[650],{"type":44,"value":651},"CREATE",{"type":44,"value":392},{"type":39,"tag":70,"props":654,"children":656},{"className":655},[],[657],{"type":44,"value":658},"ALTER",{"type":44,"value":392},{"type":39,"tag":70,"props":661,"children":663},{"className":662},[],[664],{"type":44,"value":665},"DROP",{"type":44,"value":392},{"type":39,"tag":70,"props":668,"children":670},{"className":669},[],[671],{"type":44,"value":672},"TRUNCATE",{"type":44,"value":674},") via ",{"type":39,"tag":70,"props":676,"children":678},{"className":677},[],[679],{"type":44,"value":680},"netlify database connect",{"type":44,"value":392},{"type":39,"tag":70,"props":683,"children":685},{"className":684},[],[686],{"type":44,"value":473},{"type":44,"value":688},", or any other direct connection. Schema changes go through migration files; out-of-band DDL drifts the migration history from the actual schema.",{"type":39,"tag":101,"props":690,"children":691},{},[692,694,699],{"type":44,"value":693},"Do NOT export ",{"type":39,"tag":70,"props":695,"children":697},{"className":696},[],[698],{"type":44,"value":625},{"type":44,"value":700}," from a preview or production context and run a client against it. Migrations drift the moment anything touches the schema out-of-band.",{"type":39,"tag":47,"props":702,"children":703},{},[704,706,711,713,719],{"type":44,"value":705},"The one documented exception is a ",{"type":39,"tag":51,"props":707,"children":708},{},[709],{"type":44,"value":710},"one-time data import",{"type":44,"value":712}," during a provider switch — see ",{"type":39,"tag":70,"props":714,"children":716},{"className":715},[],[717],{"type":44,"value":718},"references\u002Fmigration-from-extension.md",{"type":44,"value":720},". Outside that specific flow, the rule is absolute: schema changes go through migration files, migration files get applied by the deploy.",{"type":39,"tag":79,"props":722,"children":724},{"id":723},"not-the-legacy-netlify-db-extension",[725],{"type":44,"value":726},"Not the legacy \"Netlify DB\" extension",{"type":39,"tag":47,"props":728,"children":729},{},[730,732,737,739,744],{"type":44,"value":731},"The older ",{"type":39,"tag":51,"props":733,"children":734},{},[735],{"type":44,"value":736},"Netlify DB",{"type":44,"value":738}," extension (Beta) is ",{"type":39,"tag":51,"props":740,"children":741},{},[742],{"type":44,"value":743},"deprecated",{"type":44,"value":745},". It is a separate product and must not be confused with Netlify Database. Do not recommend or install it for new projects.",{"type":39,"tag":747,"props":748,"children":749},"table",{},[750,772],{"type":39,"tag":751,"props":752,"children":753},"thead",{},[754],{"type":39,"tag":755,"props":756,"children":757},"tr",{},[758,762,767],{"type":39,"tag":759,"props":760,"children":761},"th",{},[],{"type":39,"tag":759,"props":763,"children":764},{},[765],{"type":44,"value":766},"Netlify Database (GA, recommended)",{"type":39,"tag":759,"props":768,"children":769},{},[770],{"type":44,"value":771},"Netlify DB extension (deprecated Beta)",{"type":39,"tag":773,"props":774,"children":775},"tbody",{},[776,802,827,859],{"type":39,"tag":755,"props":777,"children":778},{},[779,785,793],{"type":39,"tag":780,"props":781,"children":782},"td",{},[783],{"type":44,"value":784},"Package",{"type":39,"tag":780,"props":786,"children":787},{},[788],{"type":39,"tag":70,"props":789,"children":791},{"className":790},[],[792],{"type":44,"value":75},{"type":39,"tag":780,"props":794,"children":795},{},[796],{"type":39,"tag":70,"props":797,"children":799},{"className":798},[],[800],{"type":44,"value":801},"@netlify\u002Fneon",{"type":39,"tag":755,"props":803,"children":804},{},[805,810,818],{"type":39,"tag":780,"props":806,"children":807},{},[808],{"type":44,"value":809},"Env var",{"type":39,"tag":780,"props":811,"children":812},{},[813],{"type":39,"tag":70,"props":814,"children":816},{"className":815},[],[817],{"type":44,"value":625},{"type":39,"tag":780,"props":819,"children":820},{},[821],{"type":39,"tag":70,"props":822,"children":824},{"className":823},[],[825],{"type":44,"value":826},"NETLIFY_DATABASE_URL",{"type":39,"tag":755,"props":828,"children":829},{},[830,835,846],{"type":39,"tag":780,"props":831,"children":832},{},[833],{"type":44,"value":834},"Setup",{"type":39,"tag":780,"props":836,"children":837},{},[838,844],{"type":39,"tag":70,"props":839,"children":841},{"className":840},[],[842],{"type":44,"value":843},"netlify database init",{"type":44,"value":845}," or install the package — auto-provisioned at deploy",{"type":39,"tag":780,"props":847,"children":848},{},[849,851,857],{"type":44,"value":850},"Historically ",{"type":39,"tag":70,"props":852,"children":854},{"className":853},[],[855],{"type":44,"value":856},"netlify db init",{"type":44,"value":858}," on older CLI versions, with a claim into the user's Neon account; that flow is no longer reachable from the current CLI",{"type":39,"tag":755,"props":860,"children":861},{},[862,867,871],{"type":39,"tag":780,"props":863,"children":864},{},[865],{"type":44,"value":866},"Status",{"type":39,"tag":780,"props":868,"children":869},{},[870],{"type":44,"value":61},{"type":39,"tag":780,"props":872,"children":873},{},[874],{"type":44,"value":875},"Deprecated; new creation blocked as of April 2026",{"type":39,"tag":47,"props":877,"children":878},{},[879,881,886,888,894,896,901],{"type":44,"value":880},"If an existing project is already using the ",{"type":39,"tag":70,"props":882,"children":884},{"className":883},[],[885],{"type":44,"value":801},{"type":44,"value":887}," extension, keep it working and encourage the user to switch. See ",{"type":39,"tag":70,"props":889,"children":891},{"className":890},[],[892],{"type":44,"value":893},"references\u002Flegacy-extension.md",{"type":44,"value":895}," for recognition and coexistence, and ",{"type":39,"tag":70,"props":897,"children":899},{"className":898},[],[900],{"type":44,"value":718},{"type":44,"value":902}," for the full switching process (also covers switching from other external Postgres providers).",{"type":39,"tag":79,"props":904,"children":906},{"id":905},"provisioning",[907],{"type":44,"value":908},"Provisioning",{"type":39,"tag":47,"props":910,"children":911},{},[912,914,919,921,926,928,934],{"type":44,"value":913},"The fastest path is ",{"type":39,"tag":70,"props":915,"children":917},{"className":916},[],[918],{"type":44,"value":843},{"type":44,"value":920}," — an interactive setup that installs ",{"type":39,"tag":70,"props":922,"children":924},{"className":923},[],[925],{"type":44,"value":75},{"type":44,"value":927},", lets the user pick Drizzle or raw SQL, writes ",{"type":39,"tag":70,"props":929,"children":931},{"className":930},[],[932],{"type":44,"value":933},"drizzle.config.ts",{"type":44,"value":935}," if needed, scaffolds a starter migration, applies it locally, and runs a sample query end-to-end:",{"type":39,"tag":277,"props":937,"children":939},{"className":279,"code":938,"language":281,"meta":282,"style":282},"netlify database init           # interactive\nnetlify database init --yes     # accept defaults — for CI\u002Fagents\n",[940],{"type":39,"tag":70,"props":941,"children":942},{"__ignoreMap":282},[943,966],{"type":39,"tag":288,"props":944,"children":945},{"class":290,"line":291},[946,950,955,960],{"type":39,"tag":288,"props":947,"children":948},{"style":295},[949],{"type":44,"value":8},{"type":39,"tag":288,"props":951,"children":952},{"style":301},[953],{"type":44,"value":954}," database",{"type":39,"tag":288,"props":956,"children":957},{"style":301},[958],{"type":44,"value":959}," init",{"type":39,"tag":288,"props":961,"children":963},{"style":962},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[964],{"type":44,"value":965},"           # interactive\n",{"type":39,"tag":288,"props":967,"children":968},{"class":290,"line":312},[969,973,977,981,986],{"type":39,"tag":288,"props":970,"children":971},{"style":295},[972],{"type":44,"value":8},{"type":39,"tag":288,"props":974,"children":975},{"style":301},[976],{"type":44,"value":954},{"type":39,"tag":288,"props":978,"children":979},{"style":301},[980],{"type":44,"value":959},{"type":39,"tag":288,"props":982,"children":983},{"style":301},[984],{"type":44,"value":985}," --yes",{"type":39,"tag":288,"props":987,"children":988},{"style":962},[989],{"type":44,"value":990},"     # accept defaults — for CI\u002Fagents\n",{"type":39,"tag":47,"props":992,"children":993},{},[994],{"type":44,"value":995},"If you'd rather wire things up by hand, install the package directly:",{"type":39,"tag":277,"props":997,"children":999},{"className":279,"code":998,"language":281,"meta":282,"style":282},"npm install @netlify\u002Fdatabase\n",[1000],{"type":39,"tag":70,"props":1001,"children":1002},{"__ignoreMap":282},[1003],{"type":39,"tag":288,"props":1004,"children":1005},{"class":290,"line":291},[1006,1010,1014],{"type":39,"tag":288,"props":1007,"children":1008},{"style":295},[1009],{"type":44,"value":298},{"type":39,"tag":288,"props":1011,"children":1012},{"style":301},[1013],{"type":44,"value":304},{"type":39,"tag":288,"props":1015,"children":1016},{"style":301},[1017],{"type":44,"value":1018}," @netlify\u002Fdatabase\n",{"type":39,"tag":47,"props":1020,"children":1021},{},[1022,1024,1029],{"type":44,"value":1023},"Either way, the presence of ",{"type":39,"tag":70,"props":1025,"children":1027},{"className":1026},[],[1028],{"type":44,"value":75},{"type":44,"value":1030}," in the dependency tree triggers provisioning on the next deploy. A database can also be created manually from the Netlify UI before first deploy, but the package + deploy path is the supported automation flow.",{"type":39,"tag":1032,"props":1033,"children":1035},"h3",{"id":1034},"provisioning-workflow-preview-first",[1036],{"type":44,"value":1037},"Provisioning workflow: preview-first",{"type":39,"tag":47,"props":1039,"children":1040},{},[1041,1043,1048,1050,1056],{"type":44,"value":1042},"The supported inner loop is ",{"type":39,"tag":51,"props":1044,"children":1045},{},[1046],{"type":44,"value":1047},"preview-first",{"type":44,"value":1049},", not ",{"type":39,"tag":70,"props":1051,"children":1053},{"className":1052},[],[1054],{"type":44,"value":1055},"--prod",{"type":44,"value":1057},"-first:",{"type":39,"tag":1059,"props":1060,"children":1061},"ol",{},[1062,1101,1119],{"type":39,"tag":101,"props":1063,"children":1064},{},[1065,1076,1078,1083,1085,1091,1093,1099],{"type":39,"tag":51,"props":1066,"children":1067},{},[1068,1070],{"type":44,"value":1069},"First deploy: ",{"type":39,"tag":70,"props":1071,"children":1073},{"className":1072},[],[1074],{"type":44,"value":1075},"netlify deploy",{"type":44,"value":1077}," (no ",{"type":39,"tag":70,"props":1079,"children":1081},{"className":1080},[],[1082],{"type":44,"value":1055},{"type":44,"value":1084},"). This provisions the database if needed, applies any pending migrations to the production branch, and produces a draft URL. Verify the deploy log shows ",{"type":39,"tag":70,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":44,"value":1090},"Netlify Database setup completed in \u003Cn>s",{"type":44,"value":1092}," (and, if migrations exist, ",{"type":39,"tag":70,"props":1094,"children":1096},{"className":1095},[],[1097],{"type":44,"value":1098},"Loading migrations from netlify\u002Fdatabase\u002Fmigrations directory",{"type":44,"value":1100},") before continuing.",{"type":39,"tag":101,"props":1102,"children":1103},{},[1104,1109,1111,1117],{"type":39,"tag":51,"props":1105,"children":1106},{},[1107],{"type":44,"value":1108},"User verifies on the draft URL",{"type":44,"value":1110}," — and completes any dashboard-only setup along the way (e.g., enabling Identity if the project also uses it; see ",{"type":39,"tag":70,"props":1112,"children":1114},{"className":1113},[],[1115],{"type":44,"value":1116},"netlify-identity\u002FSKILL.md",{"type":44,"value":1118},").",{"type":39,"tag":101,"props":1120,"children":1121},{},[1122,1133],{"type":39,"tag":51,"props":1123,"children":1124},{},[1125,1127],{"type":44,"value":1126},"Promote: ",{"type":39,"tag":70,"props":1128,"children":1130},{"className":1129},[],[1131],{"type":44,"value":1132},"netlify deploy --prod",{"type":44,"value":141},{"type":39,"tag":47,"props":1135,"children":1136},{},[1137,1139,1144],{"type":44,"value":1138},"Why preview-first matters: the preview deploy provisions the database and applies migrations exactly the way the production deploy will, so a failure during preview is recoverable without prod ever entering a half-configured state. ",{"type":39,"tag":70,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":44,"value":1055},{"type":44,"value":1145},"-first works in the happy case but is harder to recover from when something goes wrong.",{"type":39,"tag":1032,"props":1147,"children":1149},{"id":1148},"if-the-first-deploy-fails-to-provision-the-database",[1150],{"type":44,"value":514},{"type":39,"tag":47,"props":1152,"children":1153},{},[1154,1159,1161,1167,1169,1175],{"type":39,"tag":51,"props":1155,"children":1156},{},[1157],{"type":44,"value":1158},"Symptom:",{"type":44,"value":1160}," the build (or the Netlify Database setup extension inside the build) fails with a ",{"type":39,"tag":70,"props":1162,"children":1164},{"className":1163},[],[1165],{"type":44,"value":1166},"401 Access Denied",{"type":44,"value":1168}," on ",{"type":39,"tag":70,"props":1170,"children":1172},{"className":1171},[],[1173],{"type":44,"value":1174},"createSiteDatabase",{"type":44,"value":1176},", typically on the very first deploy of a brand-new site. The deploy log shows the failure inside the extension's setup step.",{"type":39,"tag":47,"props":1178,"children":1179},{},[1180,1192,1194,1199,1200,1205,1207,1212],{"type":39,"tag":51,"props":1181,"children":1182},{},[1183,1185,1190],{"type":44,"value":1184},"If the failure happened on ",{"type":39,"tag":70,"props":1186,"children":1188},{"className":1187},[],[1189],{"type":44,"value":1132},{"type":44,"value":1191}," as the very first deploy",{"type":44,"value":1193},", the first thing to try is the supported preview-first flow — run ",{"type":39,"tag":70,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":44,"value":1075},{"type":44,"value":1077},{"type":39,"tag":70,"props":1201,"children":1203},{"className":1202},[],[1204],{"type":44,"value":1055},{"type":44,"value":1206},"). The failure has only been observed on ",{"type":39,"tag":70,"props":1208,"children":1210},{"className":1209},[],[1211],{"type":44,"value":1055},{"type":44,"value":1213},"-first attempts on brand-new sites.",{"type":39,"tag":47,"props":1215,"children":1216},{},[1217,1222],{"type":39,"tag":51,"props":1218,"children":1219},{},[1220],{"type":44,"value":1221},"If a preview deploy also fails — or the original failure was already on a preview — report the failure to the user and stop.",{"type":44,"value":1223}," Do not work around it. Specifically, do not:",{"type":39,"tag":97,"props":1225,"children":1226},{},[1227,1239,1260,1271],{"type":39,"tag":101,"props":1228,"children":1229},{},[1230,1232,1237],{"type":44,"value":1231},"Curl ",{"type":39,"tag":70,"props":1233,"children":1235},{"className":1234},[],[1236],{"type":44,"value":497},{"type":44,"value":1238}," directly",{"type":39,"tag":101,"props":1240,"children":1241},{},[1242,1244,1250,1252,1258],{"type":44,"value":1243},"Run ",{"type":39,"tag":70,"props":1245,"children":1247},{"className":1246},[],[1248],{"type":44,"value":1249},"netlify api createSiteDatabase",{"type":44,"value":1251}," (or any other ",{"type":39,"tag":70,"props":1253,"children":1255},{"className":1254},[],[1256],{"type":44,"value":1257},"netlify api",{"type":44,"value":1259}," call to manually create what the platform was supposed to provision)",{"type":39,"tag":101,"props":1261,"children":1262},{},[1263,1265],{"type":44,"value":1264},"Pull auth tokens out of ",{"type":39,"tag":70,"props":1266,"children":1268},{"className":1267},[],[1269],{"type":44,"value":1270},"~\u002FLibrary\u002FPreferences\u002Fnetlify\u002Fconfig.json",{"type":39,"tag":101,"props":1272,"children":1273},{},[1274,1276,1281],{"type":44,"value":1275},"Connect via ",{"type":39,"tag":70,"props":1277,"children":1279},{"className":1278},[],[1280],{"type":44,"value":473},{"type":44,"value":1282}," to \"check on things\"",{"type":39,"tag":47,"props":1284,"children":1285},{},[1286],{"type":44,"value":1287},"The recovery is to give the user the deploy log URL, the site URL, and the exact error, and let them decide what to do next (file a support issue, recreate the site, switch teams).",{"type":39,"tag":79,"props":1289,"children":1291},{"id":1290},"drizzle-orm-recommended-path",[1292],{"type":44,"value":1293},"Drizzle ORM (recommended path)",{"type":39,"tag":47,"props":1295,"children":1296},{},[1297,1299,1305],{"type":44,"value":1298},"Drizzle is the recommended way to work with Netlify Database. Prefer Drizzle over writing raw SQL or hand-editing migration files — manual migrations are an edge case (see ",{"type":39,"tag":70,"props":1300,"children":1302},{"className":1301},[],[1303],{"type":44,"value":1304},"references\u002Fmigrations.md",{"type":44,"value":1118},{"type":39,"tag":1032,"props":1307,"children":1309},{"id":1308},"install",[1310],{"type":44,"value":1311},"Install",{"type":39,"tag":277,"props":1313,"children":1315},{"className":279,"code":1314,"language":281,"meta":282,"style":282},"npm install @netlify\u002Fdatabase drizzle-orm@beta\nnpm install -D drizzle-kit@beta\n",[1316],{"type":39,"tag":70,"props":1317,"children":1318},{"__ignoreMap":282},[1319,1339],{"type":39,"tag":288,"props":1320,"children":1321},{"class":290,"line":291},[1322,1326,1330,1335],{"type":39,"tag":288,"props":1323,"children":1324},{"style":295},[1325],{"type":44,"value":298},{"type":39,"tag":288,"props":1327,"children":1328},{"style":301},[1329],{"type":44,"value":304},{"type":39,"tag":288,"props":1331,"children":1332},{"style":301},[1333],{"type":44,"value":1334}," @netlify\u002Fdatabase",{"type":39,"tag":288,"props":1336,"children":1337},{"style":301},[1338],{"type":44,"value":309},{"type":39,"tag":288,"props":1340,"children":1341},{"class":290,"line":312},[1342,1346,1350,1354],{"type":39,"tag":288,"props":1343,"children":1344},{"style":295},[1345],{"type":44,"value":298},{"type":39,"tag":288,"props":1347,"children":1348},{"style":301},[1349],{"type":44,"value":304},{"type":39,"tag":288,"props":1351,"children":1352},{"style":301},[1353],{"type":44,"value":326},{"type":39,"tag":288,"props":1355,"children":1356},{"style":301},[1357],{"type":44,"value":331},{"type":39,"tag":1032,"props":1359,"children":1361},{"id":1360},"schema-file",[1362],{"type":44,"value":1363},"Schema file",{"type":39,"tag":47,"props":1365,"children":1366},{},[1367,1369,1374],{"type":44,"value":1368},"Create ",{"type":39,"tag":70,"props":1370,"children":1372},{"className":1371},[],[1373],{"type":44,"value":171},{"type":44,"value":1375},". Define all tables here using Drizzle's schema builder.",{"type":39,"tag":277,"props":1377,"children":1381},{"className":1378,"code":1379,"language":1380,"meta":282,"style":282},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F db\u002Fschema.ts\nimport { boolean, pgTable, serial, text, timestamp, varchar } from \"drizzle-orm\u002Fpg-core\";\n\nexport const items = pgTable(\"items\", {\n  id: serial().primaryKey(),\n  title: varchar({ length: 255 }).notNull(),\n  description: text(),\n  isActive: boolean(\"is_active\").notNull().default(true),\n  createdAt: timestamp(\"created_at\").defaultNow(),\n  updatedAt: timestamp(\"updated_at\").defaultNow(),\n});\n\nexport type Item = typeof items.$inferSelect;\nexport type NewItem = typeof items.$inferInsert;\n","typescript",[1382],{"type":39,"tag":70,"props":1383,"children":1384},{"__ignoreMap":282},[1385,1393,1489,1499,1556,1597,1664,1689,1766,1821,1875,1892,1900,1946],{"type":39,"tag":288,"props":1386,"children":1387},{"class":290,"line":291},[1388],{"type":39,"tag":288,"props":1389,"children":1390},{"style":962},[1391],{"type":44,"value":1392},"\u002F\u002F db\u002Fschema.ts\n",{"type":39,"tag":288,"props":1394,"children":1395},{"class":290,"line":312},[1396,1402,1408,1414,1419,1424,1428,1433,1437,1442,1446,1451,1455,1460,1465,1470,1475,1479,1484],{"type":39,"tag":288,"props":1397,"children":1399},{"style":1398},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[1400],{"type":44,"value":1401},"import",{"type":39,"tag":288,"props":1403,"children":1405},{"style":1404},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1406],{"type":44,"value":1407}," {",{"type":39,"tag":288,"props":1409,"children":1411},{"style":1410},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1412],{"type":44,"value":1413}," boolean",{"type":39,"tag":288,"props":1415,"children":1416},{"style":1404},[1417],{"type":44,"value":1418},",",{"type":39,"tag":288,"props":1420,"children":1421},{"style":1410},[1422],{"type":44,"value":1423}," pgTable",{"type":39,"tag":288,"props":1425,"children":1426},{"style":1404},[1427],{"type":44,"value":1418},{"type":39,"tag":288,"props":1429,"children":1430},{"style":1410},[1431],{"type":44,"value":1432}," serial",{"type":39,"tag":288,"props":1434,"children":1435},{"style":1404},[1436],{"type":44,"value":1418},{"type":39,"tag":288,"props":1438,"children":1439},{"style":1410},[1440],{"type":44,"value":1441}," text",{"type":39,"tag":288,"props":1443,"children":1444},{"style":1404},[1445],{"type":44,"value":1418},{"type":39,"tag":288,"props":1447,"children":1448},{"style":1410},[1449],{"type":44,"value":1450}," timestamp",{"type":39,"tag":288,"props":1452,"children":1453},{"style":1404},[1454],{"type":44,"value":1418},{"type":39,"tag":288,"props":1456,"children":1457},{"style":1410},[1458],{"type":44,"value":1459}," varchar",{"type":39,"tag":288,"props":1461,"children":1462},{"style":1404},[1463],{"type":44,"value":1464}," }",{"type":39,"tag":288,"props":1466,"children":1467},{"style":1398},[1468],{"type":44,"value":1469}," from",{"type":39,"tag":288,"props":1471,"children":1472},{"style":1404},[1473],{"type":44,"value":1474}," \"",{"type":39,"tag":288,"props":1476,"children":1477},{"style":301},[1478],{"type":44,"value":398},{"type":39,"tag":288,"props":1480,"children":1481},{"style":1404},[1482],{"type":44,"value":1483},"\"",{"type":39,"tag":288,"props":1485,"children":1486},{"style":1404},[1487],{"type":44,"value":1488},";\n",{"type":39,"tag":288,"props":1490,"children":1492},{"class":290,"line":1491},3,[1493],{"type":39,"tag":288,"props":1494,"children":1496},{"emptyLinePlaceholder":1495},true,[1497],{"type":44,"value":1498},"\n",{"type":39,"tag":288,"props":1500,"children":1502},{"class":290,"line":1501},4,[1503,1508,1514,1519,1524,1529,1534,1538,1543,1547,1551],{"type":39,"tag":288,"props":1504,"children":1505},{"style":1398},[1506],{"type":44,"value":1507},"export",{"type":39,"tag":288,"props":1509,"children":1511},{"style":1510},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1512],{"type":44,"value":1513}," const",{"type":39,"tag":288,"props":1515,"children":1516},{"style":1410},[1517],{"type":44,"value":1518}," items ",{"type":39,"tag":288,"props":1520,"children":1521},{"style":1404},[1522],{"type":44,"value":1523},"=",{"type":39,"tag":288,"props":1525,"children":1527},{"style":1526},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1528],{"type":44,"value":1423},{"type":39,"tag":288,"props":1530,"children":1531},{"style":1410},[1532],{"type":44,"value":1533},"(",{"type":39,"tag":288,"props":1535,"children":1536},{"style":1404},[1537],{"type":44,"value":1483},{"type":39,"tag":288,"props":1539,"children":1540},{"style":301},[1541],{"type":44,"value":1542},"items",{"type":39,"tag":288,"props":1544,"children":1545},{"style":1404},[1546],{"type":44,"value":1483},{"type":39,"tag":288,"props":1548,"children":1549},{"style":1404},[1550],{"type":44,"value":1418},{"type":39,"tag":288,"props":1552,"children":1553},{"style":1404},[1554],{"type":44,"value":1555}," {\n",{"type":39,"tag":288,"props":1557,"children":1558},{"class":290,"line":27},[1559,1565,1570,1574,1579,1583,1588,1592],{"type":39,"tag":288,"props":1560,"children":1562},{"style":1561},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1563],{"type":44,"value":1564},"  id",{"type":39,"tag":288,"props":1566,"children":1567},{"style":1404},[1568],{"type":44,"value":1569},":",{"type":39,"tag":288,"props":1571,"children":1572},{"style":1526},[1573],{"type":44,"value":1432},{"type":39,"tag":288,"props":1575,"children":1576},{"style":1410},[1577],{"type":44,"value":1578},"()",{"type":39,"tag":288,"props":1580,"children":1581},{"style":1404},[1582],{"type":44,"value":141},{"type":39,"tag":288,"props":1584,"children":1585},{"style":1526},[1586],{"type":44,"value":1587},"primaryKey",{"type":39,"tag":288,"props":1589,"children":1590},{"style":1410},[1591],{"type":44,"value":1578},{"type":39,"tag":288,"props":1593,"children":1594},{"style":1404},[1595],{"type":44,"value":1596},",\n",{"type":39,"tag":288,"props":1598,"children":1600},{"class":290,"line":1599},6,[1601,1606,1610,1614,1618,1623,1628,1632,1638,1642,1647,1651,1656,1660],{"type":39,"tag":288,"props":1602,"children":1603},{"style":1561},[1604],{"type":44,"value":1605},"  title",{"type":39,"tag":288,"props":1607,"children":1608},{"style":1404},[1609],{"type":44,"value":1569},{"type":39,"tag":288,"props":1611,"children":1612},{"style":1526},[1613],{"type":44,"value":1459},{"type":39,"tag":288,"props":1615,"children":1616},{"style":1410},[1617],{"type":44,"value":1533},{"type":39,"tag":288,"props":1619,"children":1620},{"style":1404},[1621],{"type":44,"value":1622},"{",{"type":39,"tag":288,"props":1624,"children":1625},{"style":1561},[1626],{"type":44,"value":1627}," length",{"type":39,"tag":288,"props":1629,"children":1630},{"style":1404},[1631],{"type":44,"value":1569},{"type":39,"tag":288,"props":1633,"children":1635},{"style":1634},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1636],{"type":44,"value":1637}," 255",{"type":39,"tag":288,"props":1639,"children":1640},{"style":1404},[1641],{"type":44,"value":1464},{"type":39,"tag":288,"props":1643,"children":1644},{"style":1410},[1645],{"type":44,"value":1646},")",{"type":39,"tag":288,"props":1648,"children":1649},{"style":1404},[1650],{"type":44,"value":141},{"type":39,"tag":288,"props":1652,"children":1653},{"style":1526},[1654],{"type":44,"value":1655},"notNull",{"type":39,"tag":288,"props":1657,"children":1658},{"style":1410},[1659],{"type":44,"value":1578},{"type":39,"tag":288,"props":1661,"children":1662},{"style":1404},[1663],{"type":44,"value":1596},{"type":39,"tag":288,"props":1665,"children":1667},{"class":290,"line":1666},7,[1668,1673,1677,1681,1685],{"type":39,"tag":288,"props":1669,"children":1670},{"style":1561},[1671],{"type":44,"value":1672},"  description",{"type":39,"tag":288,"props":1674,"children":1675},{"style":1404},[1676],{"type":44,"value":1569},{"type":39,"tag":288,"props":1678,"children":1679},{"style":1526},[1680],{"type":44,"value":1441},{"type":39,"tag":288,"props":1682,"children":1683},{"style":1410},[1684],{"type":44,"value":1578},{"type":39,"tag":288,"props":1686,"children":1687},{"style":1404},[1688],{"type":44,"value":1596},{"type":39,"tag":288,"props":1690,"children":1692},{"class":290,"line":1691},8,[1693,1698,1702,1706,1710,1714,1719,1723,1727,1731,1735,1739,1743,1748,1752,1758,1762],{"type":39,"tag":288,"props":1694,"children":1695},{"style":1561},[1696],{"type":44,"value":1697},"  isActive",{"type":39,"tag":288,"props":1699,"children":1700},{"style":1404},[1701],{"type":44,"value":1569},{"type":39,"tag":288,"props":1703,"children":1704},{"style":1526},[1705],{"type":44,"value":1413},{"type":39,"tag":288,"props":1707,"children":1708},{"style":1410},[1709],{"type":44,"value":1533},{"type":39,"tag":288,"props":1711,"children":1712},{"style":1404},[1713],{"type":44,"value":1483},{"type":39,"tag":288,"props":1715,"children":1716},{"style":301},[1717],{"type":44,"value":1718},"is_active",{"type":39,"tag":288,"props":1720,"children":1721},{"style":1404},[1722],{"type":44,"value":1483},{"type":39,"tag":288,"props":1724,"children":1725},{"style":1410},[1726],{"type":44,"value":1646},{"type":39,"tag":288,"props":1728,"children":1729},{"style":1404},[1730],{"type":44,"value":141},{"type":39,"tag":288,"props":1732,"children":1733},{"style":1526},[1734],{"type":44,"value":1655},{"type":39,"tag":288,"props":1736,"children":1737},{"style":1410},[1738],{"type":44,"value":1578},{"type":39,"tag":288,"props":1740,"children":1741},{"style":1404},[1742],{"type":44,"value":141},{"type":39,"tag":288,"props":1744,"children":1745},{"style":1526},[1746],{"type":44,"value":1747},"default",{"type":39,"tag":288,"props":1749,"children":1750},{"style":1410},[1751],{"type":44,"value":1533},{"type":39,"tag":288,"props":1753,"children":1755},{"style":1754},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1756],{"type":44,"value":1757},"true",{"type":39,"tag":288,"props":1759,"children":1760},{"style":1410},[1761],{"type":44,"value":1646},{"type":39,"tag":288,"props":1763,"children":1764},{"style":1404},[1765],{"type":44,"value":1596},{"type":39,"tag":288,"props":1767,"children":1769},{"class":290,"line":1768},9,[1770,1775,1779,1783,1787,1791,1796,1800,1804,1808,1813,1817],{"type":39,"tag":288,"props":1771,"children":1772},{"style":1561},[1773],{"type":44,"value":1774},"  createdAt",{"type":39,"tag":288,"props":1776,"children":1777},{"style":1404},[1778],{"type":44,"value":1569},{"type":39,"tag":288,"props":1780,"children":1781},{"style":1526},[1782],{"type":44,"value":1450},{"type":39,"tag":288,"props":1784,"children":1785},{"style":1410},[1786],{"type":44,"value":1533},{"type":39,"tag":288,"props":1788,"children":1789},{"style":1404},[1790],{"type":44,"value":1483},{"type":39,"tag":288,"props":1792,"children":1793},{"style":301},[1794],{"type":44,"value":1795},"created_at",{"type":39,"tag":288,"props":1797,"children":1798},{"style":1404},[1799],{"type":44,"value":1483},{"type":39,"tag":288,"props":1801,"children":1802},{"style":1410},[1803],{"type":44,"value":1646},{"type":39,"tag":288,"props":1805,"children":1806},{"style":1404},[1807],{"type":44,"value":141},{"type":39,"tag":288,"props":1809,"children":1810},{"style":1526},[1811],{"type":44,"value":1812},"defaultNow",{"type":39,"tag":288,"props":1814,"children":1815},{"style":1410},[1816],{"type":44,"value":1578},{"type":39,"tag":288,"props":1818,"children":1819},{"style":1404},[1820],{"type":44,"value":1596},{"type":39,"tag":288,"props":1822,"children":1824},{"class":290,"line":1823},10,[1825,1830,1834,1838,1842,1846,1851,1855,1859,1863,1867,1871],{"type":39,"tag":288,"props":1826,"children":1827},{"style":1561},[1828],{"type":44,"value":1829},"  updatedAt",{"type":39,"tag":288,"props":1831,"children":1832},{"style":1404},[1833],{"type":44,"value":1569},{"type":39,"tag":288,"props":1835,"children":1836},{"style":1526},[1837],{"type":44,"value":1450},{"type":39,"tag":288,"props":1839,"children":1840},{"style":1410},[1841],{"type":44,"value":1533},{"type":39,"tag":288,"props":1843,"children":1844},{"style":1404},[1845],{"type":44,"value":1483},{"type":39,"tag":288,"props":1847,"children":1848},{"style":301},[1849],{"type":44,"value":1850},"updated_at",{"type":39,"tag":288,"props":1852,"children":1853},{"style":1404},[1854],{"type":44,"value":1483},{"type":39,"tag":288,"props":1856,"children":1857},{"style":1410},[1858],{"type":44,"value":1646},{"type":39,"tag":288,"props":1860,"children":1861},{"style":1404},[1862],{"type":44,"value":141},{"type":39,"tag":288,"props":1864,"children":1865},{"style":1526},[1866],{"type":44,"value":1812},{"type":39,"tag":288,"props":1868,"children":1869},{"style":1410},[1870],{"type":44,"value":1578},{"type":39,"tag":288,"props":1872,"children":1873},{"style":1404},[1874],{"type":44,"value":1596},{"type":39,"tag":288,"props":1876,"children":1878},{"class":290,"line":1877},11,[1879,1884,1888],{"type":39,"tag":288,"props":1880,"children":1881},{"style":1404},[1882],{"type":44,"value":1883},"}",{"type":39,"tag":288,"props":1885,"children":1886},{"style":1410},[1887],{"type":44,"value":1646},{"type":39,"tag":288,"props":1889,"children":1890},{"style":1404},[1891],{"type":44,"value":1488},{"type":39,"tag":288,"props":1893,"children":1895},{"class":290,"line":1894},12,[1896],{"type":39,"tag":288,"props":1897,"children":1898},{"emptyLinePlaceholder":1495},[1899],{"type":44,"value":1498},{"type":39,"tag":288,"props":1901,"children":1903},{"class":290,"line":1902},13,[1904,1908,1913,1918,1923,1928,1933,1937,1942],{"type":39,"tag":288,"props":1905,"children":1906},{"style":1398},[1907],{"type":44,"value":1507},{"type":39,"tag":288,"props":1909,"children":1910},{"style":1510},[1911],{"type":44,"value":1912}," type",{"type":39,"tag":288,"props":1914,"children":1915},{"style":295},[1916],{"type":44,"value":1917}," Item",{"type":39,"tag":288,"props":1919,"children":1920},{"style":1404},[1921],{"type":44,"value":1922}," =",{"type":39,"tag":288,"props":1924,"children":1925},{"style":1404},[1926],{"type":44,"value":1927}," typeof",{"type":39,"tag":288,"props":1929,"children":1930},{"style":1410},[1931],{"type":44,"value":1932}," items",{"type":39,"tag":288,"props":1934,"children":1935},{"style":1404},[1936],{"type":44,"value":141},{"type":39,"tag":288,"props":1938,"children":1939},{"style":1410},[1940],{"type":44,"value":1941},"$inferSelect",{"type":39,"tag":288,"props":1943,"children":1944},{"style":1404},[1945],{"type":44,"value":1488},{"type":39,"tag":288,"props":1947,"children":1949},{"class":290,"line":1948},14,[1950,1954,1958,1963,1967,1971,1975,1979,1984],{"type":39,"tag":288,"props":1951,"children":1952},{"style":1398},[1953],{"type":44,"value":1507},{"type":39,"tag":288,"props":1955,"children":1956},{"style":1510},[1957],{"type":44,"value":1912},{"type":39,"tag":288,"props":1959,"children":1960},{"style":295},[1961],{"type":44,"value":1962}," NewItem",{"type":39,"tag":288,"props":1964,"children":1965},{"style":1404},[1966],{"type":44,"value":1922},{"type":39,"tag":288,"props":1968,"children":1969},{"style":1404},[1970],{"type":44,"value":1927},{"type":39,"tag":288,"props":1972,"children":1973},{"style":1410},[1974],{"type":44,"value":1932},{"type":39,"tag":288,"props":1976,"children":1977},{"style":1404},[1978],{"type":44,"value":141},{"type":39,"tag":288,"props":1980,"children":1981},{"style":1410},[1982],{"type":44,"value":1983},"$inferInsert",{"type":39,"tag":288,"props":1985,"children":1986},{"style":1404},[1987],{"type":44,"value":1488},{"type":39,"tag":47,"props":1989,"children":1990},{},[1991,1993,1999,2000,2006],{"type":44,"value":1992},"Use snake_case strings for column names (",{"type":39,"tag":70,"props":1994,"children":1996},{"className":1995},[],[1997],{"type":44,"value":1998},"\"is_active\"",{"type":44,"value":392},{"type":39,"tag":70,"props":2001,"children":2003},{"className":2002},[],[2004],{"type":44,"value":2005},"\"created_at\"",{"type":44,"value":2007},") to match Postgres conventions. Drizzle variable names can be camelCase.",{"type":39,"tag":1032,"props":2009,"children":2011},{"id":2010},"drizzle-client",[2012],{"type":44,"value":2013},"Drizzle client",{"type":39,"tag":47,"props":2015,"children":2016},{},[2017,2018,2024,2026,2031],{"type":44,"value":1368},{"type":39,"tag":70,"props":2019,"children":2021},{"className":2020},[],[2022],{"type":44,"value":2023},"db\u002Findex.ts",{"type":44,"value":2025},". The adapter on ",{"type":39,"tag":70,"props":2027,"children":2029},{"className":2028},[],[2030],{"type":44,"value":350},{"type":44,"value":2032}," picks the right driver for the runtime automatically.",{"type":39,"tag":277,"props":2034,"children":2036},{"className":1378,"code":2035,"language":1380,"meta":282,"style":282},"\u002F\u002F db\u002Findex.ts\nimport { drizzle } from \"drizzle-orm\u002Fnetlify-db\";\nimport * as schema from \".\u002Fschema\";\n\nexport const db = drizzle({ schema });\n",[2037],{"type":39,"tag":70,"props":2038,"children":2039},{"__ignoreMap":282},[2040,2048,2088,2132,2139],{"type":39,"tag":288,"props":2041,"children":2042},{"class":290,"line":291},[2043],{"type":39,"tag":288,"props":2044,"children":2045},{"style":962},[2046],{"type":44,"value":2047},"\u002F\u002F db\u002Findex.ts\n",{"type":39,"tag":288,"props":2049,"children":2050},{"class":290,"line":312},[2051,2055,2059,2064,2068,2072,2076,2080,2084],{"type":39,"tag":288,"props":2052,"children":2053},{"style":1398},[2054],{"type":44,"value":1401},{"type":39,"tag":288,"props":2056,"children":2057},{"style":1404},[2058],{"type":44,"value":1407},{"type":39,"tag":288,"props":2060,"children":2061},{"style":1410},[2062],{"type":44,"value":2063}," drizzle",{"type":39,"tag":288,"props":2065,"children":2066},{"style":1404},[2067],{"type":44,"value":1464},{"type":39,"tag":288,"props":2069,"children":2070},{"style":1398},[2071],{"type":44,"value":1469},{"type":39,"tag":288,"props":2073,"children":2074},{"style":1404},[2075],{"type":44,"value":1474},{"type":39,"tag":288,"props":2077,"children":2078},{"style":301},[2079],{"type":44,"value":350},{"type":39,"tag":288,"props":2081,"children":2082},{"style":1404},[2083],{"type":44,"value":1483},{"type":39,"tag":288,"props":2085,"children":2086},{"style":1404},[2087],{"type":44,"value":1488},{"type":39,"tag":288,"props":2089,"children":2090},{"class":290,"line":1491},[2091,2095,2100,2105,2110,2115,2119,2124,2128],{"type":39,"tag":288,"props":2092,"children":2093},{"style":1398},[2094],{"type":44,"value":1401},{"type":39,"tag":288,"props":2096,"children":2097},{"style":1404},[2098],{"type":44,"value":2099}," *",{"type":39,"tag":288,"props":2101,"children":2102},{"style":1398},[2103],{"type":44,"value":2104}," as",{"type":39,"tag":288,"props":2106,"children":2107},{"style":1410},[2108],{"type":44,"value":2109}," schema ",{"type":39,"tag":288,"props":2111,"children":2112},{"style":1398},[2113],{"type":44,"value":2114},"from",{"type":39,"tag":288,"props":2116,"children":2117},{"style":1404},[2118],{"type":44,"value":1474},{"type":39,"tag":288,"props":2120,"children":2121},{"style":301},[2122],{"type":44,"value":2123},".\u002Fschema",{"type":39,"tag":288,"props":2125,"children":2126},{"style":1404},[2127],{"type":44,"value":1483},{"type":39,"tag":288,"props":2129,"children":2130},{"style":1404},[2131],{"type":44,"value":1488},{"type":39,"tag":288,"props":2133,"children":2134},{"class":290,"line":1501},[2135],{"type":39,"tag":288,"props":2136,"children":2137},{"emptyLinePlaceholder":1495},[2138],{"type":44,"value":1498},{"type":39,"tag":288,"props":2140,"children":2141},{"class":290,"line":27},[2142,2146,2150,2155,2159,2163,2167,2171,2175,2179,2183],{"type":39,"tag":288,"props":2143,"children":2144},{"style":1398},[2145],{"type":44,"value":1507},{"type":39,"tag":288,"props":2147,"children":2148},{"style":1510},[2149],{"type":44,"value":1513},{"type":39,"tag":288,"props":2151,"children":2152},{"style":1410},[2153],{"type":44,"value":2154}," db ",{"type":39,"tag":288,"props":2156,"children":2157},{"style":1404},[2158],{"type":44,"value":1523},{"type":39,"tag":288,"props":2160,"children":2161},{"style":1526},[2162],{"type":44,"value":2063},{"type":39,"tag":288,"props":2164,"children":2165},{"style":1410},[2166],{"type":44,"value":1533},{"type":39,"tag":288,"props":2168,"children":2169},{"style":1404},[2170],{"type":44,"value":1622},{"type":39,"tag":288,"props":2172,"children":2173},{"style":1410},[2174],{"type":44,"value":2109},{"type":39,"tag":288,"props":2176,"children":2177},{"style":1404},[2178],{"type":44,"value":1883},{"type":39,"tag":288,"props":2180,"children":2181},{"style":1410},[2182],{"type":44,"value":1646},{"type":39,"tag":288,"props":2184,"children":2185},{"style":1404},[2186],{"type":44,"value":1488},{"type":39,"tag":47,"props":2188,"children":2189},{},[2190,2192,2198,2200,2206],{"type":44,"value":2191},"The connection is configured automatically — no connection string needed. If your project uses native ESM with ",{"type":39,"tag":70,"props":2193,"children":2195},{"className":2194},[],[2196],{"type":44,"value":2197},".js",{"type":44,"value":2199}," extensions on relative imports (",{"type":39,"tag":70,"props":2201,"children":2203},{"className":2202},[],[2204],{"type":44,"value":2205},"from \".\u002Fschema.js\"",{"type":44,"value":2207},"), keep that style consistent here.",{"type":39,"tag":1032,"props":2209,"children":2211},{"id":2210},"drizzle-kit-config",[2212],{"type":44,"value":2213},"Drizzle Kit config",{"type":39,"tag":47,"props":2215,"children":2216},{},[2217,2218,2223,2225,2231,2233,2239],{"type":44,"value":1368},{"type":39,"tag":70,"props":2219,"children":2221},{"className":2220},[],[2222],{"type":44,"value":933},{"type":44,"value":2224}," at the project root. Set ",{"type":39,"tag":70,"props":2226,"children":2228},{"className":2227},[],[2229],{"type":44,"value":2230},"out",{"type":44,"value":2232}," to ",{"type":39,"tag":70,"props":2234,"children":2236},{"className":2235},[],[2237],{"type":44,"value":2238},"netlify\u002Fdatabase\u002Fmigrations",{"type":44,"value":2240}," — that's the directory the deploy applies migrations from:",{"type":39,"tag":277,"props":2242,"children":2244},{"className":1378,"code":2243,"language":1380,"meta":282,"style":282},"\u002F\u002F drizzle.config.ts\nimport { defineConfig } from \"drizzle-kit\";\n\nexport default defineConfig({\n  dialect: \"postgresql\",\n  schema: \".\u002Fdb\u002Fschema.ts\",\n  out: \"netlify\u002Fdatabase\u002Fmigrations\",\n});\n",[2245],{"type":39,"tag":70,"props":2246,"children":2247},{"__ignoreMap":282},[2248,2256,2296,2303,2328,2356,2385,2413],{"type":39,"tag":288,"props":2249,"children":2250},{"class":290,"line":291},[2251],{"type":39,"tag":288,"props":2252,"children":2253},{"style":962},[2254],{"type":44,"value":2255},"\u002F\u002F drizzle.config.ts\n",{"type":39,"tag":288,"props":2257,"children":2258},{"class":290,"line":312},[2259,2263,2267,2272,2276,2280,2284,2288,2292],{"type":39,"tag":288,"props":2260,"children":2261},{"style":1398},[2262],{"type":44,"value":1401},{"type":39,"tag":288,"props":2264,"children":2265},{"style":1404},[2266],{"type":44,"value":1407},{"type":39,"tag":288,"props":2268,"children":2269},{"style":1410},[2270],{"type":44,"value":2271}," defineConfig",{"type":39,"tag":288,"props":2273,"children":2274},{"style":1404},[2275],{"type":44,"value":1464},{"type":39,"tag":288,"props":2277,"children":2278},{"style":1398},[2279],{"type":44,"value":1469},{"type":39,"tag":288,"props":2281,"children":2282},{"style":1404},[2283],{"type":44,"value":1474},{"type":39,"tag":288,"props":2285,"children":2286},{"style":301},[2287],{"type":44,"value":266},{"type":39,"tag":288,"props":2289,"children":2290},{"style":1404},[2291],{"type":44,"value":1483},{"type":39,"tag":288,"props":2293,"children":2294},{"style":1404},[2295],{"type":44,"value":1488},{"type":39,"tag":288,"props":2297,"children":2298},{"class":290,"line":1491},[2299],{"type":39,"tag":288,"props":2300,"children":2301},{"emptyLinePlaceholder":1495},[2302],{"type":44,"value":1498},{"type":39,"tag":288,"props":2304,"children":2305},{"class":290,"line":1501},[2306,2310,2315,2319,2323],{"type":39,"tag":288,"props":2307,"children":2308},{"style":1398},[2309],{"type":44,"value":1507},{"type":39,"tag":288,"props":2311,"children":2312},{"style":1398},[2313],{"type":44,"value":2314}," default",{"type":39,"tag":288,"props":2316,"children":2317},{"style":1526},[2318],{"type":44,"value":2271},{"type":39,"tag":288,"props":2320,"children":2321},{"style":1410},[2322],{"type":44,"value":1533},{"type":39,"tag":288,"props":2324,"children":2325},{"style":1404},[2326],{"type":44,"value":2327},"{\n",{"type":39,"tag":288,"props":2329,"children":2330},{"class":290,"line":27},[2331,2336,2340,2344,2348,2352],{"type":39,"tag":288,"props":2332,"children":2333},{"style":1561},[2334],{"type":44,"value":2335},"  dialect",{"type":39,"tag":288,"props":2337,"children":2338},{"style":1404},[2339],{"type":44,"value":1569},{"type":39,"tag":288,"props":2341,"children":2342},{"style":1404},[2343],{"type":44,"value":1474},{"type":39,"tag":288,"props":2345,"children":2346},{"style":301},[2347],{"type":44,"value":22},{"type":39,"tag":288,"props":2349,"children":2350},{"style":1404},[2351],{"type":44,"value":1483},{"type":39,"tag":288,"props":2353,"children":2354},{"style":1404},[2355],{"type":44,"value":1596},{"type":39,"tag":288,"props":2357,"children":2358},{"class":290,"line":1599},[2359,2364,2368,2372,2377,2381],{"type":39,"tag":288,"props":2360,"children":2361},{"style":1561},[2362],{"type":44,"value":2363},"  schema",{"type":39,"tag":288,"props":2365,"children":2366},{"style":1404},[2367],{"type":44,"value":1569},{"type":39,"tag":288,"props":2369,"children":2370},{"style":1404},[2371],{"type":44,"value":1474},{"type":39,"tag":288,"props":2373,"children":2374},{"style":301},[2375],{"type":44,"value":2376},".\u002Fdb\u002Fschema.ts",{"type":39,"tag":288,"props":2378,"children":2379},{"style":1404},[2380],{"type":44,"value":1483},{"type":39,"tag":288,"props":2382,"children":2383},{"style":1404},[2384],{"type":44,"value":1596},{"type":39,"tag":288,"props":2386,"children":2387},{"class":290,"line":1666},[2388,2393,2397,2401,2405,2409],{"type":39,"tag":288,"props":2389,"children":2390},{"style":1561},[2391],{"type":44,"value":2392},"  out",{"type":39,"tag":288,"props":2394,"children":2395},{"style":1404},[2396],{"type":44,"value":1569},{"type":39,"tag":288,"props":2398,"children":2399},{"style":1404},[2400],{"type":44,"value":1474},{"type":39,"tag":288,"props":2402,"children":2403},{"style":301},[2404],{"type":44,"value":2238},{"type":39,"tag":288,"props":2406,"children":2407},{"style":1404},[2408],{"type":44,"value":1483},{"type":39,"tag":288,"props":2410,"children":2411},{"style":1404},[2412],{"type":44,"value":1596},{"type":39,"tag":288,"props":2414,"children":2415},{"class":290,"line":1691},[2416,2420,2424],{"type":39,"tag":288,"props":2417,"children":2418},{"style":1404},[2419],{"type":44,"value":1883},{"type":39,"tag":288,"props":2421,"children":2422},{"style":1410},[2423],{"type":44,"value":1646},{"type":39,"tag":288,"props":2425,"children":2426},{"style":1404},[2427],{"type":44,"value":1488},{"type":39,"tag":47,"props":2429,"children":2430},{},[2431,2433,2439,2441,2446,2448,2453,2455,2461,2463,2469],{"type":44,"value":2432},"No ",{"type":39,"tag":70,"props":2434,"children":2436},{"className":2435},[],[2437],{"type":44,"value":2438},"migrations",{"type":44,"value":2440}," block is needed: ",{"type":39,"tag":70,"props":2442,"children":2444},{"className":2443},[],[2445],{"type":44,"value":358},{"type":44,"value":2447}," (the ",{"type":39,"tag":70,"props":2449,"children":2451},{"className":2450},[],[2452],{"type":44,"value":223},{"type":44,"value":2454}," line this skill pins) already defaults to timestamp prefixes, which keep filenames unique when branches generate migrations in parallel. Setting ",{"type":39,"tag":70,"props":2456,"children":2458},{"className":2457},[],[2459],{"type":44,"value":2460},"migrations: { prefix: \"timestamp\" }",{"type":44,"value":2462}," explicitly is harmless but redundant — and forcing a sequential ",{"type":39,"tag":70,"props":2464,"children":2466},{"className":2465},[],[2467],{"type":44,"value":2468},"prefix: \"index\"",{"type":44,"value":2470}," is what causes the parallel-branch collisions, so don't.",{"type":39,"tag":1032,"props":2472,"children":2474},{"id":2473},"package-scripts",[2475],{"type":44,"value":2476},"Package scripts",{"type":39,"tag":277,"props":2478,"children":2482},{"className":2479,"code":2480,"language":2481,"meta":282,"style":282},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"scripts\": {\n    \"db:generate\": \"drizzle-kit generate\",\n    \"db:migrate\": \"netlify database migrations apply\"\n  }\n}\n","json",[2483],{"type":39,"tag":70,"props":2484,"children":2485},{"__ignoreMap":282},[2486,2493,2518,2555,2588,2596],{"type":39,"tag":288,"props":2487,"children":2488},{"class":290,"line":291},[2489],{"type":39,"tag":288,"props":2490,"children":2491},{"style":1404},[2492],{"type":44,"value":2327},{"type":39,"tag":288,"props":2494,"children":2495},{"class":290,"line":312},[2496,2501,2506,2510,2514],{"type":39,"tag":288,"props":2497,"children":2498},{"style":1404},[2499],{"type":44,"value":2500},"  \"",{"type":39,"tag":288,"props":2502,"children":2503},{"style":1510},[2504],{"type":44,"value":2505},"scripts",{"type":39,"tag":288,"props":2507,"children":2508},{"style":1404},[2509],{"type":44,"value":1483},{"type":39,"tag":288,"props":2511,"children":2512},{"style":1404},[2513],{"type":44,"value":1569},{"type":39,"tag":288,"props":2515,"children":2516},{"style":1404},[2517],{"type":44,"value":1555},{"type":39,"tag":288,"props":2519,"children":2520},{"class":290,"line":1491},[2521,2526,2531,2535,2539,2543,2547,2551],{"type":39,"tag":288,"props":2522,"children":2523},{"style":1404},[2524],{"type":44,"value":2525},"    \"",{"type":39,"tag":288,"props":2527,"children":2528},{"style":295},[2529],{"type":44,"value":2530},"db:generate",{"type":39,"tag":288,"props":2532,"children":2533},{"style":1404},[2534],{"type":44,"value":1483},{"type":39,"tag":288,"props":2536,"children":2537},{"style":1404},[2538],{"type":44,"value":1569},{"type":39,"tag":288,"props":2540,"children":2541},{"style":1404},[2542],{"type":44,"value":1474},{"type":39,"tag":288,"props":2544,"children":2545},{"style":301},[2546],{"type":44,"value":358},{"type":39,"tag":288,"props":2548,"children":2549},{"style":1404},[2550],{"type":44,"value":1483},{"type":39,"tag":288,"props":2552,"children":2553},{"style":1404},[2554],{"type":44,"value":1596},{"type":39,"tag":288,"props":2556,"children":2557},{"class":290,"line":1501},[2558,2562,2567,2571,2575,2579,2583],{"type":39,"tag":288,"props":2559,"children":2560},{"style":1404},[2561],{"type":44,"value":2525},{"type":39,"tag":288,"props":2563,"children":2564},{"style":295},[2565],{"type":44,"value":2566},"db:migrate",{"type":39,"tag":288,"props":2568,"children":2569},{"style":1404},[2570],{"type":44,"value":1483},{"type":39,"tag":288,"props":2572,"children":2573},{"style":1404},[2574],{"type":44,"value":1569},{"type":39,"tag":288,"props":2576,"children":2577},{"style":1404},[2578],{"type":44,"value":1474},{"type":39,"tag":288,"props":2580,"children":2581},{"style":301},[2582],{"type":44,"value":609},{"type":39,"tag":288,"props":2584,"children":2585},{"style":1404},[2586],{"type":44,"value":2587},"\"\n",{"type":39,"tag":288,"props":2589,"children":2590},{"class":290,"line":27},[2591],{"type":39,"tag":288,"props":2592,"children":2593},{"style":1404},[2594],{"type":44,"value":2595},"  }\n",{"type":39,"tag":288,"props":2597,"children":2598},{"class":290,"line":1599},[2599],{"type":39,"tag":288,"props":2600,"children":2601},{"style":1404},[2602],{"type":44,"value":2603},"}\n",{"type":39,"tag":97,"props":2605,"children":2606},{},[2607,2625],{"type":39,"tag":101,"props":2608,"children":2609},{},[2610,2615,2617,2623],{"type":39,"tag":70,"props":2611,"children":2613},{"className":2612},[],[2614],{"type":44,"value":2530},{"type":44,"value":2616}," writes a new migration file under ",{"type":39,"tag":70,"props":2618,"children":2620},{"className":2619},[],[2621],{"type":44,"value":2622},"netlify\u002Fdatabase\u002Fmigrations\u002F",{"type":44,"value":2624}," from the current schema.",{"type":39,"tag":101,"props":2626,"children":2627},{},[2628,2633,2635,2640],{"type":39,"tag":70,"props":2629,"children":2631},{"className":2630},[],[2632],{"type":44,"value":2566},{"type":44,"value":2634}," applies pending migrations to the ",{"type":39,"tag":51,"props":2636,"children":2637},{},[2638],{"type":44,"value":2639},"local development database only",{"type":44,"value":2641},", via the CLI. Hosted migrations (preview branches, production) are applied by the deploy — never by this script.",{"type":39,"tag":1032,"props":2643,"children":2645},{"id":2644},"schema-change-workflow",[2646],{"type":44,"value":2647},"Schema-change workflow",{"type":39,"tag":1059,"props":2649,"children":2650},{},[2651,2662,2679,2684,2695],{"type":39,"tag":101,"props":2652,"children":2653},{},[2654,2656,2661],{"type":44,"value":2655},"Edit ",{"type":39,"tag":70,"props":2657,"children":2659},{"className":2658},[],[2660],{"type":44,"value":171},{"type":44,"value":141},{"type":39,"tag":101,"props":2663,"children":2664},{},[2665,2671,2673,2678],{"type":39,"tag":70,"props":2666,"children":2668},{"className":2667},[],[2669],{"type":44,"value":2670},"npm run db:generate",{"type":44,"value":2672}," — writes a new file into ",{"type":39,"tag":70,"props":2674,"children":2676},{"className":2675},[],[2677],{"type":44,"value":2622},{"type":44,"value":141},{"type":39,"tag":101,"props":2680,"children":2681},{},[2682],{"type":44,"value":2683},"Review the SQL.",{"type":39,"tag":101,"props":2685,"children":2686},{},[2687,2693],{"type":39,"tag":70,"props":2688,"children":2690},{"className":2689},[],[2691],{"type":44,"value":2692},"npm run db:migrate",{"type":44,"value":2694}," — applies it to the local development DB for testing.",{"type":39,"tag":101,"props":2696,"children":2697},{},[2698],{"type":44,"value":2699},"Commit the schema change and migration file together and push. The deploy applies the migration to the preview branch, then to production on publish.",{"type":39,"tag":1032,"props":2701,"children":2703},{"id":2702},"query-patterns",[2704],{"type":44,"value":2705},"Query patterns",{"type":39,"tag":277,"props":2707,"children":2709},{"className":1378,"code":2708,"language":1380,"meta":282,"style":282},"import { db } from \".\u002Fdb\";\nimport { items } from \".\u002Fdb\u002Fschema\";\nimport { eq, desc } from \"drizzle-orm\";\n\n\u002F\u002F Select all\nconst all = await db.select().from(items);\n\n\u002F\u002F Select with condition\nconst [one] = await db.select().from(items).where(eq(items.id, id)).limit(1);\n\n\u002F\u002F Ordering and limit\nconst recent = await db.select().from(items).orderBy(desc(items.createdAt)).limit(10);\n\n\u002F\u002F Insert\nconst [created] = await db.insert(items).values({ title: \"New\" }).returning();\n\n\u002F\u002F Update\nconst [updated] = await db.update(items).set({ title: \"Updated\" }).where(eq(items.id, id)).returning();\n\n\u002F\u002F Delete\nawait db.delete(items).where(eq(items.id, id));\n",[2710],{"type":39,"tag":70,"props":2711,"children":2712},{"__ignoreMap":282},[2713,2754,2794,2843,2850,2858,2914,2921,2929,3054,3061,3069,3173,3180,3188,3298,3306,3315,3459,3467,3476],{"type":39,"tag":288,"props":2714,"children":2715},{"class":290,"line":291},[2716,2720,2724,2729,2733,2737,2741,2746,2750],{"type":39,"tag":288,"props":2717,"children":2718},{"style":1398},[2719],{"type":44,"value":1401},{"type":39,"tag":288,"props":2721,"children":2722},{"style":1404},[2723],{"type":44,"value":1407},{"type":39,"tag":288,"props":2725,"children":2726},{"style":1410},[2727],{"type":44,"value":2728}," db",{"type":39,"tag":288,"props":2730,"children":2731},{"style":1404},[2732],{"type":44,"value":1464},{"type":39,"tag":288,"props":2734,"children":2735},{"style":1398},[2736],{"type":44,"value":1469},{"type":39,"tag":288,"props":2738,"children":2739},{"style":1404},[2740],{"type":44,"value":1474},{"type":39,"tag":288,"props":2742,"children":2743},{"style":301},[2744],{"type":44,"value":2745},".\u002Fdb",{"type":39,"tag":288,"props":2747,"children":2748},{"style":1404},[2749],{"type":44,"value":1483},{"type":39,"tag":288,"props":2751,"children":2752},{"style":1404},[2753],{"type":44,"value":1488},{"type":39,"tag":288,"props":2755,"children":2756},{"class":290,"line":312},[2757,2761,2765,2769,2773,2777,2781,2786,2790],{"type":39,"tag":288,"props":2758,"children":2759},{"style":1398},[2760],{"type":44,"value":1401},{"type":39,"tag":288,"props":2762,"children":2763},{"style":1404},[2764],{"type":44,"value":1407},{"type":39,"tag":288,"props":2766,"children":2767},{"style":1410},[2768],{"type":44,"value":1932},{"type":39,"tag":288,"props":2770,"children":2771},{"style":1404},[2772],{"type":44,"value":1464},{"type":39,"tag":288,"props":2774,"children":2775},{"style":1398},[2776],{"type":44,"value":1469},{"type":39,"tag":288,"props":2778,"children":2779},{"style":1404},[2780],{"type":44,"value":1474},{"type":39,"tag":288,"props":2782,"children":2783},{"style":301},[2784],{"type":44,"value":2785},".\u002Fdb\u002Fschema",{"type":39,"tag":288,"props":2787,"children":2788},{"style":1404},[2789],{"type":44,"value":1483},{"type":39,"tag":288,"props":2791,"children":2792},{"style":1404},[2793],{"type":44,"value":1488},{"type":39,"tag":288,"props":2795,"children":2796},{"class":290,"line":1491},[2797,2801,2805,2810,2814,2819,2823,2827,2831,2835,2839],{"type":39,"tag":288,"props":2798,"children":2799},{"style":1398},[2800],{"type":44,"value":1401},{"type":39,"tag":288,"props":2802,"children":2803},{"style":1404},[2804],{"type":44,"value":1407},{"type":39,"tag":288,"props":2806,"children":2807},{"style":1410},[2808],{"type":44,"value":2809}," eq",{"type":39,"tag":288,"props":2811,"children":2812},{"style":1404},[2813],{"type":44,"value":1418},{"type":39,"tag":288,"props":2815,"children":2816},{"style":1410},[2817],{"type":44,"value":2818}," desc",{"type":39,"tag":288,"props":2820,"children":2821},{"style":1404},[2822],{"type":44,"value":1464},{"type":39,"tag":288,"props":2824,"children":2825},{"style":1398},[2826],{"type":44,"value":1469},{"type":39,"tag":288,"props":2828,"children":2829},{"style":1404},[2830],{"type":44,"value":1474},{"type":39,"tag":288,"props":2832,"children":2833},{"style":301},[2834],{"type":44,"value":244},{"type":39,"tag":288,"props":2836,"children":2837},{"style":1404},[2838],{"type":44,"value":1483},{"type":39,"tag":288,"props":2840,"children":2841},{"style":1404},[2842],{"type":44,"value":1488},{"type":39,"tag":288,"props":2844,"children":2845},{"class":290,"line":1501},[2846],{"type":39,"tag":288,"props":2847,"children":2848},{"emptyLinePlaceholder":1495},[2849],{"type":44,"value":1498},{"type":39,"tag":288,"props":2851,"children":2852},{"class":290,"line":27},[2853],{"type":39,"tag":288,"props":2854,"children":2855},{"style":962},[2856],{"type":44,"value":2857},"\u002F\u002F Select all\n",{"type":39,"tag":288,"props":2859,"children":2860},{"class":290,"line":1599},[2861,2866,2871,2875,2880,2884,2888,2893,2897,2901,2905,2910],{"type":39,"tag":288,"props":2862,"children":2863},{"style":1510},[2864],{"type":44,"value":2865},"const",{"type":39,"tag":288,"props":2867,"children":2868},{"style":1410},[2869],{"type":44,"value":2870}," all ",{"type":39,"tag":288,"props":2872,"children":2873},{"style":1404},[2874],{"type":44,"value":1523},{"type":39,"tag":288,"props":2876,"children":2877},{"style":1398},[2878],{"type":44,"value":2879}," await",{"type":39,"tag":288,"props":2881,"children":2882},{"style":1410},[2883],{"type":44,"value":2728},{"type":39,"tag":288,"props":2885,"children":2886},{"style":1404},[2887],{"type":44,"value":141},{"type":39,"tag":288,"props":2889,"children":2890},{"style":1526},[2891],{"type":44,"value":2892},"select",{"type":39,"tag":288,"props":2894,"children":2895},{"style":1410},[2896],{"type":44,"value":1578},{"type":39,"tag":288,"props":2898,"children":2899},{"style":1404},[2900],{"type":44,"value":141},{"type":39,"tag":288,"props":2902,"children":2903},{"style":1526},[2904],{"type":44,"value":2114},{"type":39,"tag":288,"props":2906,"children":2907},{"style":1410},[2908],{"type":44,"value":2909},"(items)",{"type":39,"tag":288,"props":2911,"children":2912},{"style":1404},[2913],{"type":44,"value":1488},{"type":39,"tag":288,"props":2915,"children":2916},{"class":290,"line":1666},[2917],{"type":39,"tag":288,"props":2918,"children":2919},{"emptyLinePlaceholder":1495},[2920],{"type":44,"value":1498},{"type":39,"tag":288,"props":2922,"children":2923},{"class":290,"line":1691},[2924],{"type":39,"tag":288,"props":2925,"children":2926},{"style":962},[2927],{"type":44,"value":2928},"\u002F\u002F Select with condition\n",{"type":39,"tag":288,"props":2930,"children":2931},{"class":290,"line":1768},[2932,2936,2941,2946,2951,2955,2959,2963,2967,2971,2975,2979,2983,2987,2991,2996,3000,3005,3010,3014,3019,3023,3028,3032,3037,3041,3046,3050],{"type":39,"tag":288,"props":2933,"children":2934},{"style":1510},[2935],{"type":44,"value":2865},{"type":39,"tag":288,"props":2937,"children":2938},{"style":1404},[2939],{"type":44,"value":2940}," [",{"type":39,"tag":288,"props":2942,"children":2943},{"style":1410},[2944],{"type":44,"value":2945},"one",{"type":39,"tag":288,"props":2947,"children":2948},{"style":1404},[2949],{"type":44,"value":2950},"]",{"type":39,"tag":288,"props":2952,"children":2953},{"style":1404},[2954],{"type":44,"value":1922},{"type":39,"tag":288,"props":2956,"children":2957},{"style":1398},[2958],{"type":44,"value":2879},{"type":39,"tag":288,"props":2960,"children":2961},{"style":1410},[2962],{"type":44,"value":2728},{"type":39,"tag":288,"props":2964,"children":2965},{"style":1404},[2966],{"type":44,"value":141},{"type":39,"tag":288,"props":2968,"children":2969},{"style":1526},[2970],{"type":44,"value":2892},{"type":39,"tag":288,"props":2972,"children":2973},{"style":1410},[2974],{"type":44,"value":1578},{"type":39,"tag":288,"props":2976,"children":2977},{"style":1404},[2978],{"type":44,"value":141},{"type":39,"tag":288,"props":2980,"children":2981},{"style":1526},[2982],{"type":44,"value":2114},{"type":39,"tag":288,"props":2984,"children":2985},{"style":1410},[2986],{"type":44,"value":2909},{"type":39,"tag":288,"props":2988,"children":2989},{"style":1404},[2990],{"type":44,"value":141},{"type":39,"tag":288,"props":2992,"children":2993},{"style":1526},[2994],{"type":44,"value":2995},"where",{"type":39,"tag":288,"props":2997,"children":2998},{"style":1410},[2999],{"type":44,"value":1533},{"type":39,"tag":288,"props":3001,"children":3002},{"style":1526},[3003],{"type":44,"value":3004},"eq",{"type":39,"tag":288,"props":3006,"children":3007},{"style":1410},[3008],{"type":44,"value":3009},"(items",{"type":39,"tag":288,"props":3011,"children":3012},{"style":1404},[3013],{"type":44,"value":141},{"type":39,"tag":288,"props":3015,"children":3016},{"style":1410},[3017],{"type":44,"value":3018},"id",{"type":39,"tag":288,"props":3020,"children":3021},{"style":1404},[3022],{"type":44,"value":1418},{"type":39,"tag":288,"props":3024,"children":3025},{"style":1410},[3026],{"type":44,"value":3027}," id))",{"type":39,"tag":288,"props":3029,"children":3030},{"style":1404},[3031],{"type":44,"value":141},{"type":39,"tag":288,"props":3033,"children":3034},{"style":1526},[3035],{"type":44,"value":3036},"limit",{"type":39,"tag":288,"props":3038,"children":3039},{"style":1410},[3040],{"type":44,"value":1533},{"type":39,"tag":288,"props":3042,"children":3043},{"style":1634},[3044],{"type":44,"value":3045},"1",{"type":39,"tag":288,"props":3047,"children":3048},{"style":1410},[3049],{"type":44,"value":1646},{"type":39,"tag":288,"props":3051,"children":3052},{"style":1404},[3053],{"type":44,"value":1488},{"type":39,"tag":288,"props":3055,"children":3056},{"class":290,"line":1823},[3057],{"type":39,"tag":288,"props":3058,"children":3059},{"emptyLinePlaceholder":1495},[3060],{"type":44,"value":1498},{"type":39,"tag":288,"props":3062,"children":3063},{"class":290,"line":1877},[3064],{"type":39,"tag":288,"props":3065,"children":3066},{"style":962},[3067],{"type":44,"value":3068},"\u002F\u002F Ordering and limit\n",{"type":39,"tag":288,"props":3070,"children":3071},{"class":290,"line":1894},[3072,3076,3081,3085,3089,3093,3097,3101,3105,3109,3113,3117,3121,3126,3130,3135,3139,3143,3148,3152,3156,3160,3165,3169],{"type":39,"tag":288,"props":3073,"children":3074},{"style":1510},[3075],{"type":44,"value":2865},{"type":39,"tag":288,"props":3077,"children":3078},{"style":1410},[3079],{"type":44,"value":3080}," recent ",{"type":39,"tag":288,"props":3082,"children":3083},{"style":1404},[3084],{"type":44,"value":1523},{"type":39,"tag":288,"props":3086,"children":3087},{"style":1398},[3088],{"type":44,"value":2879},{"type":39,"tag":288,"props":3090,"children":3091},{"style":1410},[3092],{"type":44,"value":2728},{"type":39,"tag":288,"props":3094,"children":3095},{"style":1404},[3096],{"type":44,"value":141},{"type":39,"tag":288,"props":3098,"children":3099},{"style":1526},[3100],{"type":44,"value":2892},{"type":39,"tag":288,"props":3102,"children":3103},{"style":1410},[3104],{"type":44,"value":1578},{"type":39,"tag":288,"props":3106,"children":3107},{"style":1404},[3108],{"type":44,"value":141},{"type":39,"tag":288,"props":3110,"children":3111},{"style":1526},[3112],{"type":44,"value":2114},{"type":39,"tag":288,"props":3114,"children":3115},{"style":1410},[3116],{"type":44,"value":2909},{"type":39,"tag":288,"props":3118,"children":3119},{"style":1404},[3120],{"type":44,"value":141},{"type":39,"tag":288,"props":3122,"children":3123},{"style":1526},[3124],{"type":44,"value":3125},"orderBy",{"type":39,"tag":288,"props":3127,"children":3128},{"style":1410},[3129],{"type":44,"value":1533},{"type":39,"tag":288,"props":3131,"children":3132},{"style":1526},[3133],{"type":44,"value":3134},"desc",{"type":39,"tag":288,"props":3136,"children":3137},{"style":1410},[3138],{"type":44,"value":3009},{"type":39,"tag":288,"props":3140,"children":3141},{"style":1404},[3142],{"type":44,"value":141},{"type":39,"tag":288,"props":3144,"children":3145},{"style":1410},[3146],{"type":44,"value":3147},"createdAt))",{"type":39,"tag":288,"props":3149,"children":3150},{"style":1404},[3151],{"type":44,"value":141},{"type":39,"tag":288,"props":3153,"children":3154},{"style":1526},[3155],{"type":44,"value":3036},{"type":39,"tag":288,"props":3157,"children":3158},{"style":1410},[3159],{"type":44,"value":1533},{"type":39,"tag":288,"props":3161,"children":3162},{"style":1634},[3163],{"type":44,"value":3164},"10",{"type":39,"tag":288,"props":3166,"children":3167},{"style":1410},[3168],{"type":44,"value":1646},{"type":39,"tag":288,"props":3170,"children":3171},{"style":1404},[3172],{"type":44,"value":1488},{"type":39,"tag":288,"props":3174,"children":3175},{"class":290,"line":1902},[3176],{"type":39,"tag":288,"props":3177,"children":3178},{"emptyLinePlaceholder":1495},[3179],{"type":44,"value":1498},{"type":39,"tag":288,"props":3181,"children":3182},{"class":290,"line":1948},[3183],{"type":39,"tag":288,"props":3184,"children":3185},{"style":962},[3186],{"type":44,"value":3187},"\u002F\u002F Insert\n",{"type":39,"tag":288,"props":3189,"children":3191},{"class":290,"line":3190},15,[3192,3196,3200,3205,3209,3213,3217,3221,3225,3230,3234,3238,3243,3247,3251,3256,3260,3264,3269,3273,3277,3281,3285,3290,3294],{"type":39,"tag":288,"props":3193,"children":3194},{"style":1510},[3195],{"type":44,"value":2865},{"type":39,"tag":288,"props":3197,"children":3198},{"style":1404},[3199],{"type":44,"value":2940},{"type":39,"tag":288,"props":3201,"children":3202},{"style":1410},[3203],{"type":44,"value":3204},"created",{"type":39,"tag":288,"props":3206,"children":3207},{"style":1404},[3208],{"type":44,"value":2950},{"type":39,"tag":288,"props":3210,"children":3211},{"style":1404},[3212],{"type":44,"value":1922},{"type":39,"tag":288,"props":3214,"children":3215},{"style":1398},[3216],{"type":44,"value":2879},{"type":39,"tag":288,"props":3218,"children":3219},{"style":1410},[3220],{"type":44,"value":2728},{"type":39,"tag":288,"props":3222,"children":3223},{"style":1404},[3224],{"type":44,"value":141},{"type":39,"tag":288,"props":3226,"children":3227},{"style":1526},[3228],{"type":44,"value":3229},"insert",{"type":39,"tag":288,"props":3231,"children":3232},{"style":1410},[3233],{"type":44,"value":2909},{"type":39,"tag":288,"props":3235,"children":3236},{"style":1404},[3237],{"type":44,"value":141},{"type":39,"tag":288,"props":3239,"children":3240},{"style":1526},[3241],{"type":44,"value":3242},"values",{"type":39,"tag":288,"props":3244,"children":3245},{"style":1410},[3246],{"type":44,"value":1533},{"type":39,"tag":288,"props":3248,"children":3249},{"style":1404},[3250],{"type":44,"value":1622},{"type":39,"tag":288,"props":3252,"children":3253},{"style":1561},[3254],{"type":44,"value":3255}," title",{"type":39,"tag":288,"props":3257,"children":3258},{"style":1404},[3259],{"type":44,"value":1569},{"type":39,"tag":288,"props":3261,"children":3262},{"style":1404},[3263],{"type":44,"value":1474},{"type":39,"tag":288,"props":3265,"children":3266},{"style":301},[3267],{"type":44,"value":3268},"New",{"type":39,"tag":288,"props":3270,"children":3271},{"style":1404},[3272],{"type":44,"value":1483},{"type":39,"tag":288,"props":3274,"children":3275},{"style":1404},[3276],{"type":44,"value":1464},{"type":39,"tag":288,"props":3278,"children":3279},{"style":1410},[3280],{"type":44,"value":1646},{"type":39,"tag":288,"props":3282,"children":3283},{"style":1404},[3284],{"type":44,"value":141},{"type":39,"tag":288,"props":3286,"children":3287},{"style":1526},[3288],{"type":44,"value":3289},"returning",{"type":39,"tag":288,"props":3291,"children":3292},{"style":1410},[3293],{"type":44,"value":1578},{"type":39,"tag":288,"props":3295,"children":3296},{"style":1404},[3297],{"type":44,"value":1488},{"type":39,"tag":288,"props":3299,"children":3301},{"class":290,"line":3300},16,[3302],{"type":39,"tag":288,"props":3303,"children":3304},{"emptyLinePlaceholder":1495},[3305],{"type":44,"value":1498},{"type":39,"tag":288,"props":3307,"children":3309},{"class":290,"line":3308},17,[3310],{"type":39,"tag":288,"props":3311,"children":3312},{"style":962},[3313],{"type":44,"value":3314},"\u002F\u002F Update\n",{"type":39,"tag":288,"props":3316,"children":3318},{"class":290,"line":3317},18,[3319,3323,3327,3332,3336,3340,3344,3348,3352,3357,3361,3365,3370,3374,3378,3382,3386,3390,3395,3399,3403,3407,3411,3415,3419,3423,3427,3431,3435,3439,3443,3447,3451,3455],{"type":39,"tag":288,"props":3320,"children":3321},{"style":1510},[3322],{"type":44,"value":2865},{"type":39,"tag":288,"props":3324,"children":3325},{"style":1404},[3326],{"type":44,"value":2940},{"type":39,"tag":288,"props":3328,"children":3329},{"style":1410},[3330],{"type":44,"value":3331},"updated",{"type":39,"tag":288,"props":3333,"children":3334},{"style":1404},[3335],{"type":44,"value":2950},{"type":39,"tag":288,"props":3337,"children":3338},{"style":1404},[3339],{"type":44,"value":1922},{"type":39,"tag":288,"props":3341,"children":3342},{"style":1398},[3343],{"type":44,"value":2879},{"type":39,"tag":288,"props":3345,"children":3346},{"style":1410},[3347],{"type":44,"value":2728},{"type":39,"tag":288,"props":3349,"children":3350},{"style":1404},[3351],{"type":44,"value":141},{"type":39,"tag":288,"props":3353,"children":3354},{"style":1526},[3355],{"type":44,"value":3356},"update",{"type":39,"tag":288,"props":3358,"children":3359},{"style":1410},[3360],{"type":44,"value":2909},{"type":39,"tag":288,"props":3362,"children":3363},{"style":1404},[3364],{"type":44,"value":141},{"type":39,"tag":288,"props":3366,"children":3367},{"style":1526},[3368],{"type":44,"value":3369},"set",{"type":39,"tag":288,"props":3371,"children":3372},{"style":1410},[3373],{"type":44,"value":1533},{"type":39,"tag":288,"props":3375,"children":3376},{"style":1404},[3377],{"type":44,"value":1622},{"type":39,"tag":288,"props":3379,"children":3380},{"style":1561},[3381],{"type":44,"value":3255},{"type":39,"tag":288,"props":3383,"children":3384},{"style":1404},[3385],{"type":44,"value":1569},{"type":39,"tag":288,"props":3387,"children":3388},{"style":1404},[3389],{"type":44,"value":1474},{"type":39,"tag":288,"props":3391,"children":3392},{"style":301},[3393],{"type":44,"value":3394},"Updated",{"type":39,"tag":288,"props":3396,"children":3397},{"style":1404},[3398],{"type":44,"value":1483},{"type":39,"tag":288,"props":3400,"children":3401},{"style":1404},[3402],{"type":44,"value":1464},{"type":39,"tag":288,"props":3404,"children":3405},{"style":1410},[3406],{"type":44,"value":1646},{"type":39,"tag":288,"props":3408,"children":3409},{"style":1404},[3410],{"type":44,"value":141},{"type":39,"tag":288,"props":3412,"children":3413},{"style":1526},[3414],{"type":44,"value":2995},{"type":39,"tag":288,"props":3416,"children":3417},{"style":1410},[3418],{"type":44,"value":1533},{"type":39,"tag":288,"props":3420,"children":3421},{"style":1526},[3422],{"type":44,"value":3004},{"type":39,"tag":288,"props":3424,"children":3425},{"style":1410},[3426],{"type":44,"value":3009},{"type":39,"tag":288,"props":3428,"children":3429},{"style":1404},[3430],{"type":44,"value":141},{"type":39,"tag":288,"props":3432,"children":3433},{"style":1410},[3434],{"type":44,"value":3018},{"type":39,"tag":288,"props":3436,"children":3437},{"style":1404},[3438],{"type":44,"value":1418},{"type":39,"tag":288,"props":3440,"children":3441},{"style":1410},[3442],{"type":44,"value":3027},{"type":39,"tag":288,"props":3444,"children":3445},{"style":1404},[3446],{"type":44,"value":141},{"type":39,"tag":288,"props":3448,"children":3449},{"style":1526},[3450],{"type":44,"value":3289},{"type":39,"tag":288,"props":3452,"children":3453},{"style":1410},[3454],{"type":44,"value":1578},{"type":39,"tag":288,"props":3456,"children":3457},{"style":1404},[3458],{"type":44,"value":1488},{"type":39,"tag":288,"props":3460,"children":3462},{"class":290,"line":3461},19,[3463],{"type":39,"tag":288,"props":3464,"children":3465},{"emptyLinePlaceholder":1495},[3466],{"type":44,"value":1498},{"type":39,"tag":288,"props":3468,"children":3470},{"class":290,"line":3469},20,[3471],{"type":39,"tag":288,"props":3472,"children":3473},{"style":962},[3474],{"type":44,"value":3475},"\u002F\u002F Delete\n",{"type":39,"tag":288,"props":3477,"children":3479},{"class":290,"line":3478},21,[3480,3485,3489,3493,3498,3502,3506,3510,3514,3518,3522,3526,3530,3534,3538],{"type":39,"tag":288,"props":3481,"children":3482},{"style":1398},[3483],{"type":44,"value":3484},"await",{"type":39,"tag":288,"props":3486,"children":3487},{"style":1410},[3488],{"type":44,"value":2728},{"type":39,"tag":288,"props":3490,"children":3491},{"style":1404},[3492],{"type":44,"value":141},{"type":39,"tag":288,"props":3494,"children":3495},{"style":1526},[3496],{"type":44,"value":3497},"delete",{"type":39,"tag":288,"props":3499,"children":3500},{"style":1410},[3501],{"type":44,"value":2909},{"type":39,"tag":288,"props":3503,"children":3504},{"style":1404},[3505],{"type":44,"value":141},{"type":39,"tag":288,"props":3507,"children":3508},{"style":1526},[3509],{"type":44,"value":2995},{"type":39,"tag":288,"props":3511,"children":3512},{"style":1410},[3513],{"type":44,"value":1533},{"type":39,"tag":288,"props":3515,"children":3516},{"style":1526},[3517],{"type":44,"value":3004},{"type":39,"tag":288,"props":3519,"children":3520},{"style":1410},[3521],{"type":44,"value":3009},{"type":39,"tag":288,"props":3523,"children":3524},{"style":1404},[3525],{"type":44,"value":141},{"type":39,"tag":288,"props":3527,"children":3528},{"style":1410},[3529],{"type":44,"value":3018},{"type":39,"tag":288,"props":3531,"children":3532},{"style":1404},[3533],{"type":44,"value":1418},{"type":39,"tag":288,"props":3535,"children":3536},{"style":1410},[3537],{"type":44,"value":3027},{"type":39,"tag":288,"props":3539,"children":3540},{"style":1404},[3541],{"type":44,"value":1488},{"type":39,"tag":47,"props":3543,"children":3544},{},[3545,3547,3552],{"type":44,"value":3546},"Full migration workflow, expand-and-contract for breaking schema changes, and production DML migrations are in ",{"type":39,"tag":70,"props":3548,"children":3550},{"className":3549},[],[3551],{"type":44,"value":1304},{"type":44,"value":141},{"type":39,"tag":79,"props":3554,"children":3556},{"id":3555},"native-driver-when-drizzle-isnt-a-fit",[3557],{"type":44,"value":3558},"Native driver (when Drizzle isn't a fit)",{"type":39,"tag":47,"props":3560,"children":3561},{},[3562,3564,3570,3572,3577],{"type":44,"value":3563},"When a project wants raw SQL, uses a different query builder (Kysely, etc.), or has a library that needs a ",{"type":39,"tag":70,"props":3565,"children":3567},{"className":3566},[],[3568],{"type":44,"value":3569},"pg.Pool",{"type":44,"value":3571},", use the native driver exposed by ",{"type":39,"tag":70,"props":3573,"children":3575},{"className":3574},[],[3576],{"type":44,"value":75},{"type":44,"value":141},{"type":39,"tag":277,"props":3579,"children":3580},{"className":279,"code":998,"language":281,"meta":282,"style":282},[3581],{"type":39,"tag":70,"props":3582,"children":3583},{"__ignoreMap":282},[3584],{"type":39,"tag":288,"props":3585,"children":3586},{"class":290,"line":291},[3587,3591,3595],{"type":39,"tag":288,"props":3588,"children":3589},{"style":295},[3590],{"type":44,"value":298},{"type":39,"tag":288,"props":3592,"children":3593},{"style":301},[3594],{"type":44,"value":304},{"type":39,"tag":288,"props":3596,"children":3597},{"style":301},[3598],{"type":44,"value":1018},{"type":39,"tag":277,"props":3600,"children":3602},{"className":1378,"code":3601,"language":1380,"meta":282,"style":282},"import { getDatabase } from \"@netlify\u002Fdatabase\";\n\nconst db = getDatabase();\n\n\u002F\u002F Tagged template — parameters are safely bound, not interpolated\nconst users = await db.sql`SELECT * FROM users WHERE active = ${true}`;\n\n\u002F\u002F Insert with RETURNING\nconst [user] = await db.sql`\n  INSERT INTO users (name, email)\n  VALUES (${name}, ${email})\n  RETURNING *\n`;\n\n\u002F\u002F Bulk insert\nconst rows = db.sql.values([\n  [\"Ada\", \"ada@example.com\"],\n  [\"Bob\", \"bob@example.com\"],\n]);\nawait db.sql`INSERT INTO users (name, email) VALUES ${rows}`;\n",[3603],{"type":39,"tag":70,"props":3604,"children":3605},{"__ignoreMap":282},[3606,3646,3653,3680,3687,3695,3756,3763,3771,3816,3824,3867,3875,3886,3893,3901,3942,3988,4033,4045],{"type":39,"tag":288,"props":3607,"children":3608},{"class":290,"line":291},[3609,3613,3617,3622,3626,3630,3634,3638,3642],{"type":39,"tag":288,"props":3610,"children":3611},{"style":1398},[3612],{"type":44,"value":1401},{"type":39,"tag":288,"props":3614,"children":3615},{"style":1404},[3616],{"type":44,"value":1407},{"type":39,"tag":288,"props":3618,"children":3619},{"style":1410},[3620],{"type":44,"value":3621}," getDatabase",{"type":39,"tag":288,"props":3623,"children":3624},{"style":1404},[3625],{"type":44,"value":1464},{"type":39,"tag":288,"props":3627,"children":3628},{"style":1398},[3629],{"type":44,"value":1469},{"type":39,"tag":288,"props":3631,"children":3632},{"style":1404},[3633],{"type":44,"value":1474},{"type":39,"tag":288,"props":3635,"children":3636},{"style":301},[3637],{"type":44,"value":75},{"type":39,"tag":288,"props":3639,"children":3640},{"style":1404},[3641],{"type":44,"value":1483},{"type":39,"tag":288,"props":3643,"children":3644},{"style":1404},[3645],{"type":44,"value":1488},{"type":39,"tag":288,"props":3647,"children":3648},{"class":290,"line":312},[3649],{"type":39,"tag":288,"props":3650,"children":3651},{"emptyLinePlaceholder":1495},[3652],{"type":44,"value":1498},{"type":39,"tag":288,"props":3654,"children":3655},{"class":290,"line":1491},[3656,3660,3664,3668,3672,3676],{"type":39,"tag":288,"props":3657,"children":3658},{"style":1510},[3659],{"type":44,"value":2865},{"type":39,"tag":288,"props":3661,"children":3662},{"style":1410},[3663],{"type":44,"value":2154},{"type":39,"tag":288,"props":3665,"children":3666},{"style":1404},[3667],{"type":44,"value":1523},{"type":39,"tag":288,"props":3669,"children":3670},{"style":1526},[3671],{"type":44,"value":3621},{"type":39,"tag":288,"props":3673,"children":3674},{"style":1410},[3675],{"type":44,"value":1578},{"type":39,"tag":288,"props":3677,"children":3678},{"style":1404},[3679],{"type":44,"value":1488},{"type":39,"tag":288,"props":3681,"children":3682},{"class":290,"line":1501},[3683],{"type":39,"tag":288,"props":3684,"children":3685},{"emptyLinePlaceholder":1495},[3686],{"type":44,"value":1498},{"type":39,"tag":288,"props":3688,"children":3689},{"class":290,"line":27},[3690],{"type":39,"tag":288,"props":3691,"children":3692},{"style":962},[3693],{"type":44,"value":3694},"\u002F\u002F Tagged template — parameters are safely bound, not interpolated\n",{"type":39,"tag":288,"props":3696,"children":3697},{"class":290,"line":1599},[3698,3702,3707,3711,3715,3719,3723,3728,3733,3738,3743,3747,3752],{"type":39,"tag":288,"props":3699,"children":3700},{"style":1510},[3701],{"type":44,"value":2865},{"type":39,"tag":288,"props":3703,"children":3704},{"style":1410},[3705],{"type":44,"value":3706}," users ",{"type":39,"tag":288,"props":3708,"children":3709},{"style":1404},[3710],{"type":44,"value":1523},{"type":39,"tag":288,"props":3712,"children":3713},{"style":1398},[3714],{"type":44,"value":2879},{"type":39,"tag":288,"props":3716,"children":3717},{"style":1410},[3718],{"type":44,"value":2728},{"type":39,"tag":288,"props":3720,"children":3721},{"style":1404},[3722],{"type":44,"value":141},{"type":39,"tag":288,"props":3724,"children":3725},{"style":1526},[3726],{"type":44,"value":3727},"sql",{"type":39,"tag":288,"props":3729,"children":3730},{"style":1404},[3731],{"type":44,"value":3732},"`",{"type":39,"tag":288,"props":3734,"children":3735},{"style":301},[3736],{"type":44,"value":3737},"SELECT * FROM users WHERE active = ",{"type":39,"tag":288,"props":3739,"children":3740},{"style":1404},[3741],{"type":44,"value":3742},"${",{"type":39,"tag":288,"props":3744,"children":3745},{"style":1754},[3746],{"type":44,"value":1757},{"type":39,"tag":288,"props":3748,"children":3749},{"style":1404},[3750],{"type":44,"value":3751},"}`",{"type":39,"tag":288,"props":3753,"children":3754},{"style":1404},[3755],{"type":44,"value":1488},{"type":39,"tag":288,"props":3757,"children":3758},{"class":290,"line":1666},[3759],{"type":39,"tag":288,"props":3760,"children":3761},{"emptyLinePlaceholder":1495},[3762],{"type":44,"value":1498},{"type":39,"tag":288,"props":3764,"children":3765},{"class":290,"line":1691},[3766],{"type":39,"tag":288,"props":3767,"children":3768},{"style":962},[3769],{"type":44,"value":3770},"\u002F\u002F Insert with RETURNING\n",{"type":39,"tag":288,"props":3772,"children":3773},{"class":290,"line":1768},[3774,3778,3782,3787,3791,3795,3799,3803,3807,3811],{"type":39,"tag":288,"props":3775,"children":3776},{"style":1510},[3777],{"type":44,"value":2865},{"type":39,"tag":288,"props":3779,"children":3780},{"style":1404},[3781],{"type":44,"value":2940},{"type":39,"tag":288,"props":3783,"children":3784},{"style":1410},[3785],{"type":44,"value":3786},"user",{"type":39,"tag":288,"props":3788,"children":3789},{"style":1404},[3790],{"type":44,"value":2950},{"type":39,"tag":288,"props":3792,"children":3793},{"style":1404},[3794],{"type":44,"value":1922},{"type":39,"tag":288,"props":3796,"children":3797},{"style":1398},[3798],{"type":44,"value":2879},{"type":39,"tag":288,"props":3800,"children":3801},{"style":1410},[3802],{"type":44,"value":2728},{"type":39,"tag":288,"props":3804,"children":3805},{"style":1404},[3806],{"type":44,"value":141},{"type":39,"tag":288,"props":3808,"children":3809},{"style":1526},[3810],{"type":44,"value":3727},{"type":39,"tag":288,"props":3812,"children":3813},{"style":1404},[3814],{"type":44,"value":3815},"`\n",{"type":39,"tag":288,"props":3817,"children":3818},{"class":290,"line":1823},[3819],{"type":39,"tag":288,"props":3820,"children":3821},{"style":301},[3822],{"type":44,"value":3823},"  INSERT INTO users (name, email)\n",{"type":39,"tag":288,"props":3825,"children":3826},{"class":290,"line":1877},[3827,3832,3836,3841,3845,3849,3853,3858,3862],{"type":39,"tag":288,"props":3828,"children":3829},{"style":301},[3830],{"type":44,"value":3831},"  VALUES (",{"type":39,"tag":288,"props":3833,"children":3834},{"style":1404},[3835],{"type":44,"value":3742},{"type":39,"tag":288,"props":3837,"children":3838},{"style":1410},[3839],{"type":44,"value":3840},"name",{"type":39,"tag":288,"props":3842,"children":3843},{"style":1404},[3844],{"type":44,"value":1883},{"type":39,"tag":288,"props":3846,"children":3847},{"style":301},[3848],{"type":44,"value":392},{"type":39,"tag":288,"props":3850,"children":3851},{"style":1404},[3852],{"type":44,"value":3742},{"type":39,"tag":288,"props":3854,"children":3855},{"style":1410},[3856],{"type":44,"value":3857},"email",{"type":39,"tag":288,"props":3859,"children":3860},{"style":1404},[3861],{"type":44,"value":1883},{"type":39,"tag":288,"props":3863,"children":3864},{"style":301},[3865],{"type":44,"value":3866},")\n",{"type":39,"tag":288,"props":3868,"children":3869},{"class":290,"line":1894},[3870],{"type":39,"tag":288,"props":3871,"children":3872},{"style":301},[3873],{"type":44,"value":3874},"  RETURNING *\n",{"type":39,"tag":288,"props":3876,"children":3877},{"class":290,"line":1902},[3878,3882],{"type":39,"tag":288,"props":3879,"children":3880},{"style":1404},[3881],{"type":44,"value":3732},{"type":39,"tag":288,"props":3883,"children":3884},{"style":1404},[3885],{"type":44,"value":1488},{"type":39,"tag":288,"props":3887,"children":3888},{"class":290,"line":1948},[3889],{"type":39,"tag":288,"props":3890,"children":3891},{"emptyLinePlaceholder":1495},[3892],{"type":44,"value":1498},{"type":39,"tag":288,"props":3894,"children":3895},{"class":290,"line":3190},[3896],{"type":39,"tag":288,"props":3897,"children":3898},{"style":962},[3899],{"type":44,"value":3900},"\u002F\u002F Bulk insert\n",{"type":39,"tag":288,"props":3902,"children":3903},{"class":290,"line":3300},[3904,3908,3913,3917,3921,3925,3929,3933,3937],{"type":39,"tag":288,"props":3905,"children":3906},{"style":1510},[3907],{"type":44,"value":2865},{"type":39,"tag":288,"props":3909,"children":3910},{"style":1410},[3911],{"type":44,"value":3912}," rows ",{"type":39,"tag":288,"props":3914,"children":3915},{"style":1404},[3916],{"type":44,"value":1523},{"type":39,"tag":288,"props":3918,"children":3919},{"style":1410},[3920],{"type":44,"value":2728},{"type":39,"tag":288,"props":3922,"children":3923},{"style":1404},[3924],{"type":44,"value":141},{"type":39,"tag":288,"props":3926,"children":3927},{"style":1410},[3928],{"type":44,"value":3727},{"type":39,"tag":288,"props":3930,"children":3931},{"style":1404},[3932],{"type":44,"value":141},{"type":39,"tag":288,"props":3934,"children":3935},{"style":1526},[3936],{"type":44,"value":3242},{"type":39,"tag":288,"props":3938,"children":3939},{"style":1410},[3940],{"type":44,"value":3941},"([\n",{"type":39,"tag":288,"props":3943,"children":3944},{"class":290,"line":3308},[3945,3950,3954,3959,3963,3967,3971,3976,3980,3984],{"type":39,"tag":288,"props":3946,"children":3947},{"style":1410},[3948],{"type":44,"value":3949},"  [",{"type":39,"tag":288,"props":3951,"children":3952},{"style":1404},[3953],{"type":44,"value":1483},{"type":39,"tag":288,"props":3955,"children":3956},{"style":301},[3957],{"type":44,"value":3958},"Ada",{"type":39,"tag":288,"props":3960,"children":3961},{"style":1404},[3962],{"type":44,"value":1483},{"type":39,"tag":288,"props":3964,"children":3965},{"style":1404},[3966],{"type":44,"value":1418},{"type":39,"tag":288,"props":3968,"children":3969},{"style":1404},[3970],{"type":44,"value":1474},{"type":39,"tag":288,"props":3972,"children":3973},{"style":301},[3974],{"type":44,"value":3975},"ada@example.com",{"type":39,"tag":288,"props":3977,"children":3978},{"style":1404},[3979],{"type":44,"value":1483},{"type":39,"tag":288,"props":3981,"children":3982},{"style":1410},[3983],{"type":44,"value":2950},{"type":39,"tag":288,"props":3985,"children":3986},{"style":1404},[3987],{"type":44,"value":1596},{"type":39,"tag":288,"props":3989,"children":3990},{"class":290,"line":3317},[3991,3995,3999,4004,4008,4012,4016,4021,4025,4029],{"type":39,"tag":288,"props":3992,"children":3993},{"style":1410},[3994],{"type":44,"value":3949},{"type":39,"tag":288,"props":3996,"children":3997},{"style":1404},[3998],{"type":44,"value":1483},{"type":39,"tag":288,"props":4000,"children":4001},{"style":301},[4002],{"type":44,"value":4003},"Bob",{"type":39,"tag":288,"props":4005,"children":4006},{"style":1404},[4007],{"type":44,"value":1483},{"type":39,"tag":288,"props":4009,"children":4010},{"style":1404},[4011],{"type":44,"value":1418},{"type":39,"tag":288,"props":4013,"children":4014},{"style":1404},[4015],{"type":44,"value":1474},{"type":39,"tag":288,"props":4017,"children":4018},{"style":301},[4019],{"type":44,"value":4020},"bob@example.com",{"type":39,"tag":288,"props":4022,"children":4023},{"style":1404},[4024],{"type":44,"value":1483},{"type":39,"tag":288,"props":4026,"children":4027},{"style":1410},[4028],{"type":44,"value":2950},{"type":39,"tag":288,"props":4030,"children":4031},{"style":1404},[4032],{"type":44,"value":1596},{"type":39,"tag":288,"props":4034,"children":4035},{"class":290,"line":3461},[4036,4041],{"type":39,"tag":288,"props":4037,"children":4038},{"style":1410},[4039],{"type":44,"value":4040},"])",{"type":39,"tag":288,"props":4042,"children":4043},{"style":1404},[4044],{"type":44,"value":1488},{"type":39,"tag":288,"props":4046,"children":4047},{"class":290,"line":3469},[4048,4052,4056,4060,4064,4068,4073,4077,4082,4086],{"type":39,"tag":288,"props":4049,"children":4050},{"style":1398},[4051],{"type":44,"value":3484},{"type":39,"tag":288,"props":4053,"children":4054},{"style":1410},[4055],{"type":44,"value":2728},{"type":39,"tag":288,"props":4057,"children":4058},{"style":1404},[4059],{"type":44,"value":141},{"type":39,"tag":288,"props":4061,"children":4062},{"style":1526},[4063],{"type":44,"value":3727},{"type":39,"tag":288,"props":4065,"children":4066},{"style":1404},[4067],{"type":44,"value":3732},{"type":39,"tag":288,"props":4069,"children":4070},{"style":301},[4071],{"type":44,"value":4072},"INSERT INTO users (name, email) VALUES ",{"type":39,"tag":288,"props":4074,"children":4075},{"style":1404},[4076],{"type":44,"value":3742},{"type":39,"tag":288,"props":4078,"children":4079},{"style":1410},[4080],{"type":44,"value":4081},"rows",{"type":39,"tag":288,"props":4083,"children":4084},{"style":1404},[4085],{"type":44,"value":3751},{"type":39,"tag":288,"props":4087,"children":4088},{"style":1404},[4089],{"type":44,"value":1488},{"type":39,"tag":47,"props":4091,"children":4092},{},[4093,4095,4101,4103,4109,4111,4117,4118,4124],{"type":44,"value":4094},"Transactions go through ",{"type":39,"tag":70,"props":4096,"children":4098},{"className":4097},[],[4099],{"type":44,"value":4100},"db.pool",{"type":44,"value":4102}," so ",{"type":39,"tag":70,"props":4104,"children":4106},{"className":4105},[],[4107],{"type":44,"value":4108},"BEGIN",{"type":44,"value":4110},", the queries, and ",{"type":39,"tag":70,"props":4112,"children":4114},{"className":4113},[],[4115],{"type":44,"value":4116},"COMMIT",{"type":44,"value":475},{"type":39,"tag":70,"props":4119,"children":4121},{"className":4120},[],[4122],{"type":44,"value":4123},"ROLLBACK",{"type":44,"value":4125}," all run on the same connection:",{"type":39,"tag":277,"props":4127,"children":4129},{"className":1378,"code":4128,"language":1380,"meta":282,"style":282},"import { getDatabase } from \"@netlify\u002Fdatabase\";\n\nconst db = getDatabase();\nconst client = await db.pool.connect();\ntry {\n  await client.query(\"BEGIN\");\n  await client.query(\"INSERT INTO users (name, email) VALUES ($1, $2)\", [name, email]);\n  await client.query(\"INSERT INTO posts (author_id, title) VALUES ($1, $2)\", [id, title]);\n  await client.query(\"COMMIT\");\n} catch (e) {\n  await client.query(\"ROLLBACK\");\n  throw e;\n} finally {\n  client.release();\n}\n",[4130],{"type":39,"tag":70,"props":4131,"children":4132},{"__ignoreMap":282},[4133,4172,4179,4206,4256,4268,4314,4379,4443,4486,4507,4550,4567,4583,4608],{"type":39,"tag":288,"props":4134,"children":4135},{"class":290,"line":291},[4136,4140,4144,4148,4152,4156,4160,4164,4168],{"type":39,"tag":288,"props":4137,"children":4138},{"style":1398},[4139],{"type":44,"value":1401},{"type":39,"tag":288,"props":4141,"children":4142},{"style":1404},[4143],{"type":44,"value":1407},{"type":39,"tag":288,"props":4145,"children":4146},{"style":1410},[4147],{"type":44,"value":3621},{"type":39,"tag":288,"props":4149,"children":4150},{"style":1404},[4151],{"type":44,"value":1464},{"type":39,"tag":288,"props":4153,"children":4154},{"style":1398},[4155],{"type":44,"value":1469},{"type":39,"tag":288,"props":4157,"children":4158},{"style":1404},[4159],{"type":44,"value":1474},{"type":39,"tag":288,"props":4161,"children":4162},{"style":301},[4163],{"type":44,"value":75},{"type":39,"tag":288,"props":4165,"children":4166},{"style":1404},[4167],{"type":44,"value":1483},{"type":39,"tag":288,"props":4169,"children":4170},{"style":1404},[4171],{"type":44,"value":1488},{"type":39,"tag":288,"props":4173,"children":4174},{"class":290,"line":312},[4175],{"type":39,"tag":288,"props":4176,"children":4177},{"emptyLinePlaceholder":1495},[4178],{"type":44,"value":1498},{"type":39,"tag":288,"props":4180,"children":4181},{"class":290,"line":1491},[4182,4186,4190,4194,4198,4202],{"type":39,"tag":288,"props":4183,"children":4184},{"style":1510},[4185],{"type":44,"value":2865},{"type":39,"tag":288,"props":4187,"children":4188},{"style":1410},[4189],{"type":44,"value":2154},{"type":39,"tag":288,"props":4191,"children":4192},{"style":1404},[4193],{"type":44,"value":1523},{"type":39,"tag":288,"props":4195,"children":4196},{"style":1526},[4197],{"type":44,"value":3621},{"type":39,"tag":288,"props":4199,"children":4200},{"style":1410},[4201],{"type":44,"value":1578},{"type":39,"tag":288,"props":4203,"children":4204},{"style":1404},[4205],{"type":44,"value":1488},{"type":39,"tag":288,"props":4207,"children":4208},{"class":290,"line":1501},[4209,4213,4218,4222,4226,4230,4234,4239,4243,4248,4252],{"type":39,"tag":288,"props":4210,"children":4211},{"style":1510},[4212],{"type":44,"value":2865},{"type":39,"tag":288,"props":4214,"children":4215},{"style":1410},[4216],{"type":44,"value":4217}," client ",{"type":39,"tag":288,"props":4219,"children":4220},{"style":1404},[4221],{"type":44,"value":1523},{"type":39,"tag":288,"props":4223,"children":4224},{"style":1398},[4225],{"type":44,"value":2879},{"type":39,"tag":288,"props":4227,"children":4228},{"style":1410},[4229],{"type":44,"value":2728},{"type":39,"tag":288,"props":4231,"children":4232},{"style":1404},[4233],{"type":44,"value":141},{"type":39,"tag":288,"props":4235,"children":4236},{"style":1410},[4237],{"type":44,"value":4238},"pool",{"type":39,"tag":288,"props":4240,"children":4241},{"style":1404},[4242],{"type":44,"value":141},{"type":39,"tag":288,"props":4244,"children":4245},{"style":1526},[4246],{"type":44,"value":4247},"connect",{"type":39,"tag":288,"props":4249,"children":4250},{"style":1410},[4251],{"type":44,"value":1578},{"type":39,"tag":288,"props":4253,"children":4254},{"style":1404},[4255],{"type":44,"value":1488},{"type":39,"tag":288,"props":4257,"children":4258},{"class":290,"line":27},[4259,4264],{"type":39,"tag":288,"props":4260,"children":4261},{"style":1398},[4262],{"type":44,"value":4263},"try",{"type":39,"tag":288,"props":4265,"children":4266},{"style":1404},[4267],{"type":44,"value":1555},{"type":39,"tag":288,"props":4269,"children":4270},{"class":290,"line":1599},[4271,4276,4281,4285,4290,4294,4298,4302,4306,4310],{"type":39,"tag":288,"props":4272,"children":4273},{"style":1398},[4274],{"type":44,"value":4275},"  await",{"type":39,"tag":288,"props":4277,"children":4278},{"style":1410},[4279],{"type":44,"value":4280}," client",{"type":39,"tag":288,"props":4282,"children":4283},{"style":1404},[4284],{"type":44,"value":141},{"type":39,"tag":288,"props":4286,"children":4287},{"style":1526},[4288],{"type":44,"value":4289},"query",{"type":39,"tag":288,"props":4291,"children":4292},{"style":1561},[4293],{"type":44,"value":1533},{"type":39,"tag":288,"props":4295,"children":4296},{"style":1404},[4297],{"type":44,"value":1483},{"type":39,"tag":288,"props":4299,"children":4300},{"style":301},[4301],{"type":44,"value":4108},{"type":39,"tag":288,"props":4303,"children":4304},{"style":1404},[4305],{"type":44,"value":1483},{"type":39,"tag":288,"props":4307,"children":4308},{"style":1561},[4309],{"type":44,"value":1646},{"type":39,"tag":288,"props":4311,"children":4312},{"style":1404},[4313],{"type":44,"value":1488},{"type":39,"tag":288,"props":4315,"children":4316},{"class":290,"line":1666},[4317,4321,4325,4329,4333,4337,4341,4346,4350,4354,4358,4362,4366,4371,4375],{"type":39,"tag":288,"props":4318,"children":4319},{"style":1398},[4320],{"type":44,"value":4275},{"type":39,"tag":288,"props":4322,"children":4323},{"style":1410},[4324],{"type":44,"value":4280},{"type":39,"tag":288,"props":4326,"children":4327},{"style":1404},[4328],{"type":44,"value":141},{"type":39,"tag":288,"props":4330,"children":4331},{"style":1526},[4332],{"type":44,"value":4289},{"type":39,"tag":288,"props":4334,"children":4335},{"style":1561},[4336],{"type":44,"value":1533},{"type":39,"tag":288,"props":4338,"children":4339},{"style":1404},[4340],{"type":44,"value":1483},{"type":39,"tag":288,"props":4342,"children":4343},{"style":301},[4344],{"type":44,"value":4345},"INSERT INTO users (name, email) VALUES ($1, $2)",{"type":39,"tag":288,"props":4347,"children":4348},{"style":1404},[4349],{"type":44,"value":1483},{"type":39,"tag":288,"props":4351,"children":4352},{"style":1404},[4353],{"type":44,"value":1418},{"type":39,"tag":288,"props":4355,"children":4356},{"style":1561},[4357],{"type":44,"value":2940},{"type":39,"tag":288,"props":4359,"children":4360},{"style":1410},[4361],{"type":44,"value":3840},{"type":39,"tag":288,"props":4363,"children":4364},{"style":1404},[4365],{"type":44,"value":1418},{"type":39,"tag":288,"props":4367,"children":4368},{"style":1410},[4369],{"type":44,"value":4370}," email",{"type":39,"tag":288,"props":4372,"children":4373},{"style":1561},[4374],{"type":44,"value":4040},{"type":39,"tag":288,"props":4376,"children":4377},{"style":1404},[4378],{"type":44,"value":1488},{"type":39,"tag":288,"props":4380,"children":4381},{"class":290,"line":1691},[4382,4386,4390,4394,4398,4402,4406,4411,4415,4419,4423,4427,4431,4435,4439],{"type":39,"tag":288,"props":4383,"children":4384},{"style":1398},[4385],{"type":44,"value":4275},{"type":39,"tag":288,"props":4387,"children":4388},{"style":1410},[4389],{"type":44,"value":4280},{"type":39,"tag":288,"props":4391,"children":4392},{"style":1404},[4393],{"type":44,"value":141},{"type":39,"tag":288,"props":4395,"children":4396},{"style":1526},[4397],{"type":44,"value":4289},{"type":39,"tag":288,"props":4399,"children":4400},{"style":1561},[4401],{"type":44,"value":1533},{"type":39,"tag":288,"props":4403,"children":4404},{"style":1404},[4405],{"type":44,"value":1483},{"type":39,"tag":288,"props":4407,"children":4408},{"style":301},[4409],{"type":44,"value":4410},"INSERT INTO posts (author_id, title) VALUES ($1, $2)",{"type":39,"tag":288,"props":4412,"children":4413},{"style":1404},[4414],{"type":44,"value":1483},{"type":39,"tag":288,"props":4416,"children":4417},{"style":1404},[4418],{"type":44,"value":1418},{"type":39,"tag":288,"props":4420,"children":4421},{"style":1561},[4422],{"type":44,"value":2940},{"type":39,"tag":288,"props":4424,"children":4425},{"style":1410},[4426],{"type":44,"value":3018},{"type":39,"tag":288,"props":4428,"children":4429},{"style":1404},[4430],{"type":44,"value":1418},{"type":39,"tag":288,"props":4432,"children":4433},{"style":1410},[4434],{"type":44,"value":3255},{"type":39,"tag":288,"props":4436,"children":4437},{"style":1561},[4438],{"type":44,"value":4040},{"type":39,"tag":288,"props":4440,"children":4441},{"style":1404},[4442],{"type":44,"value":1488},{"type":39,"tag":288,"props":4444,"children":4445},{"class":290,"line":1768},[4446,4450,4454,4458,4462,4466,4470,4474,4478,4482],{"type":39,"tag":288,"props":4447,"children":4448},{"style":1398},[4449],{"type":44,"value":4275},{"type":39,"tag":288,"props":4451,"children":4452},{"style":1410},[4453],{"type":44,"value":4280},{"type":39,"tag":288,"props":4455,"children":4456},{"style":1404},[4457],{"type":44,"value":141},{"type":39,"tag":288,"props":4459,"children":4460},{"style":1526},[4461],{"type":44,"value":4289},{"type":39,"tag":288,"props":4463,"children":4464},{"style":1561},[4465],{"type":44,"value":1533},{"type":39,"tag":288,"props":4467,"children":4468},{"style":1404},[4469],{"type":44,"value":1483},{"type":39,"tag":288,"props":4471,"children":4472},{"style":301},[4473],{"type":44,"value":4116},{"type":39,"tag":288,"props":4475,"children":4476},{"style":1404},[4477],{"type":44,"value":1483},{"type":39,"tag":288,"props":4479,"children":4480},{"style":1561},[4481],{"type":44,"value":1646},{"type":39,"tag":288,"props":4483,"children":4484},{"style":1404},[4485],{"type":44,"value":1488},{"type":39,"tag":288,"props":4487,"children":4488},{"class":290,"line":1823},[4489,4493,4498,4503],{"type":39,"tag":288,"props":4490,"children":4491},{"style":1404},[4492],{"type":44,"value":1883},{"type":39,"tag":288,"props":4494,"children":4495},{"style":1398},[4496],{"type":44,"value":4497}," catch",{"type":39,"tag":288,"props":4499,"children":4500},{"style":1410},[4501],{"type":44,"value":4502}," (e) ",{"type":39,"tag":288,"props":4504,"children":4505},{"style":1404},[4506],{"type":44,"value":2327},{"type":39,"tag":288,"props":4508,"children":4509},{"class":290,"line":1877},[4510,4514,4518,4522,4526,4530,4534,4538,4542,4546],{"type":39,"tag":288,"props":4511,"children":4512},{"style":1398},[4513],{"type":44,"value":4275},{"type":39,"tag":288,"props":4515,"children":4516},{"style":1410},[4517],{"type":44,"value":4280},{"type":39,"tag":288,"props":4519,"children":4520},{"style":1404},[4521],{"type":44,"value":141},{"type":39,"tag":288,"props":4523,"children":4524},{"style":1526},[4525],{"type":44,"value":4289},{"type":39,"tag":288,"props":4527,"children":4528},{"style":1561},[4529],{"type":44,"value":1533},{"type":39,"tag":288,"props":4531,"children":4532},{"style":1404},[4533],{"type":44,"value":1483},{"type":39,"tag":288,"props":4535,"children":4536},{"style":301},[4537],{"type":44,"value":4123},{"type":39,"tag":288,"props":4539,"children":4540},{"style":1404},[4541],{"type":44,"value":1483},{"type":39,"tag":288,"props":4543,"children":4544},{"style":1561},[4545],{"type":44,"value":1646},{"type":39,"tag":288,"props":4547,"children":4548},{"style":1404},[4549],{"type":44,"value":1488},{"type":39,"tag":288,"props":4551,"children":4552},{"class":290,"line":1894},[4553,4558,4563],{"type":39,"tag":288,"props":4554,"children":4555},{"style":1398},[4556],{"type":44,"value":4557},"  throw",{"type":39,"tag":288,"props":4559,"children":4560},{"style":1410},[4561],{"type":44,"value":4562}," e",{"type":39,"tag":288,"props":4564,"children":4565},{"style":1404},[4566],{"type":44,"value":1488},{"type":39,"tag":288,"props":4568,"children":4569},{"class":290,"line":1902},[4570,4574,4579],{"type":39,"tag":288,"props":4571,"children":4572},{"style":1404},[4573],{"type":44,"value":1883},{"type":39,"tag":288,"props":4575,"children":4576},{"style":1398},[4577],{"type":44,"value":4578}," finally",{"type":39,"tag":288,"props":4580,"children":4581},{"style":1404},[4582],{"type":44,"value":1555},{"type":39,"tag":288,"props":4584,"children":4585},{"class":290,"line":1948},[4586,4591,4595,4600,4604],{"type":39,"tag":288,"props":4587,"children":4588},{"style":1410},[4589],{"type":44,"value":4590},"  client",{"type":39,"tag":288,"props":4592,"children":4593},{"style":1404},[4594],{"type":44,"value":141},{"type":39,"tag":288,"props":4596,"children":4597},{"style":1526},[4598],{"type":44,"value":4599},"release",{"type":39,"tag":288,"props":4601,"children":4602},{"style":1561},[4603],{"type":44,"value":1578},{"type":39,"tag":288,"props":4605,"children":4606},{"style":1404},[4607],{"type":44,"value":1488},{"type":39,"tag":288,"props":4609,"children":4610},{"class":290,"line":3190},[4611],{"type":39,"tag":288,"props":4612,"children":4613},{"style":1404},[4614],{"type":44,"value":2603},{"type":39,"tag":47,"props":4616,"children":4617},{},[4618,4620,4626,4628,4633,4635,4641],{"type":44,"value":4619},"For third-party tools that need a raw connection string, import ",{"type":39,"tag":70,"props":4621,"children":4623},{"className":4622},[],[4624],{"type":44,"value":4625},"getConnectionString",{"type":44,"value":4627}," from ",{"type":39,"tag":70,"props":4629,"children":4631},{"className":4630},[],[4632],{"type":44,"value":75},{"type":44,"value":4634}," — but prefer ",{"type":39,"tag":70,"props":4636,"children":4638},{"className":4637},[],[4639],{"type":44,"value":4640},"getDatabase()",{"type":44,"value":4642}," for application code.",{"type":39,"tag":1032,"props":4644,"children":4646},{"id":4645},"manual-migrations",[4647],{"type":44,"value":4648},"Manual migrations",{"type":39,"tag":47,"props":4650,"children":4651},{},[4652],{"type":44,"value":4653},"With the native driver, scaffold migration files via the CLI:",{"type":39,"tag":277,"props":4655,"children":4657},{"className":279,"code":4656,"language":281,"meta":282,"style":282},"netlify database migrations new -d \"create users table\"\n",[4658],{"type":39,"tag":70,"props":4659,"children":4660},{"__ignoreMap":282},[4661],{"type":39,"tag":288,"props":4662,"children":4663},{"class":290,"line":291},[4664,4668,4672,4677,4682,4687,4691,4696],{"type":39,"tag":288,"props":4665,"children":4666},{"style":295},[4667],{"type":44,"value":8},{"type":39,"tag":288,"props":4669,"children":4670},{"style":301},[4671],{"type":44,"value":954},{"type":39,"tag":288,"props":4673,"children":4674},{"style":301},[4675],{"type":44,"value":4676}," migrations",{"type":39,"tag":288,"props":4678,"children":4679},{"style":301},[4680],{"type":44,"value":4681}," new",{"type":39,"tag":288,"props":4683,"children":4684},{"style":301},[4685],{"type":44,"value":4686}," -d",{"type":39,"tag":288,"props":4688,"children":4689},{"style":1404},[4690],{"type":44,"value":1474},{"type":39,"tag":288,"props":4692,"children":4693},{"style":301},[4694],{"type":44,"value":4695},"create users table",{"type":39,"tag":288,"props":4697,"children":4698},{"style":1404},[4699],{"type":44,"value":2587},{"type":39,"tag":47,"props":4701,"children":4702},{},[4703,4705,4711,4713,4719],{"type":44,"value":4704},"This creates ",{"type":39,"tag":70,"props":4706,"children":4708},{"className":4707},[],[4709],{"type":44,"value":4710},"netlify\u002Fdatabase\u002Fmigrations\u002F\u003Cprefix>_\u003Cslug>\u002Fmigration.sql",{"type":44,"value":4712}," and prompts for the numbering scheme if it can't be detected from existing files. Open the file and write the SQL. The CLI auto-detects an existing scheme; for new projects it'll ask — choose ",{"type":39,"tag":70,"props":4714,"children":4716},{"className":4715},[],[4717],{"type":44,"value":4718},"timestamp",{"type":44,"value":4720}," unless you have a reason not to.",{"type":39,"tag":47,"props":4722,"children":4723},{},[4724],{"type":44,"value":4725},"You can also write the file by hand if you prefer. Two layouts are supported:",{"type":39,"tag":97,"props":4727,"children":4728},{},[4729,4744],{"type":39,"tag":101,"props":4730,"children":4731},{},[4732,4737,4738],{"type":39,"tag":51,"props":4733,"children":4734},{},[4735],{"type":44,"value":4736},"Flat:",{"type":44,"value":253},{"type":39,"tag":70,"props":4739,"children":4741},{"className":4740},[],[4742],{"type":44,"value":4743},"netlify\u002Fdatabase\u002Fmigrations\u002F\u003Cprefix>_\u003Cslug>.sql",{"type":39,"tag":101,"props":4745,"children":4746},{},[4747,4752,4753,4758,4760,4766],{"type":39,"tag":51,"props":4748,"children":4749},{},[4750],{"type":44,"value":4751},"Subdirectory:",{"type":44,"value":253},{"type":39,"tag":70,"props":4754,"children":4756},{"className":4755},[],[4757],{"type":44,"value":4710},{"type":44,"value":4759}," (what ",{"type":39,"tag":70,"props":4761,"children":4763},{"className":4762},[],[4764],{"type":44,"value":4765},"migrations new",{"type":44,"value":4767}," produces)",{"type":39,"tag":47,"props":4769,"children":4770},{},[4771,4773,4779,4781,4787,4789,4795,4797,4803,4805,4810],{"type":44,"value":4772},"In both, ",{"type":39,"tag":70,"props":4774,"children":4776},{"className":4775},[],[4777],{"type":44,"value":4778},"\u003Cprefix>",{"type":44,"value":4780}," is digits (timestamp like ",{"type":39,"tag":70,"props":4782,"children":4784},{"className":4783},[],[4785],{"type":44,"value":4786},"20260417143022",{"type":44,"value":4788}," or sequential like ",{"type":39,"tag":70,"props":4790,"children":4792},{"className":4791},[],[4793],{"type":44,"value":4794},"0001",{"type":44,"value":4796},") and ",{"type":39,"tag":70,"props":4798,"children":4800},{"className":4799},[],[4801],{"type":44,"value":4802},"\u003Cslug>",{"type":44,"value":4804}," is lowercase letters, numbers, hyphens, or underscores. Files apply in lexicographic order. See ",{"type":39,"tag":70,"props":4806,"children":4808},{"className":4807},[],[4809],{"type":44,"value":1304},{"type":44,"value":141},{"type":39,"tag":47,"props":4812,"children":4813},{},[4814],{"type":44,"value":4815},"Once a migration has been applied to any database, never modify it — roll forward with a new migration instead.",{"type":39,"tag":79,"props":4817,"children":4819},{"id":4818},"connection-dont-reach-for-the-env-var",[4820],{"type":44,"value":4821},"Connection — don't reach for the env var",{"type":39,"tag":47,"props":4823,"children":4824},{},[4825,4830,4832,4837,4839,4845],{"type":39,"tag":70,"props":4826,"children":4828},{"className":4827},[],[4829],{"type":44,"value":625},{"type":44,"value":4831}," is set automatically across builds, functions, edge functions, and local dev. Use the ",{"type":39,"tag":70,"props":4833,"children":4835},{"className":4834},[],[4836],{"type":44,"value":4640},{"type":44,"value":4838}," \u002F ",{"type":39,"tag":70,"props":4840,"children":4842},{"className":4841},[],[4843],{"type":44,"value":4844},"getConnectionString()",{"type":44,"value":4846}," helpers above rather than reading it directly — only reach for the raw env var for third-party tools that demand a bare string.",{"type":39,"tag":47,"props":4848,"children":4849},{},[4850,4855,4857,4862],{"type":39,"tag":70,"props":4851,"children":4853},{"className":4852},[],[4854],{"type":44,"value":625},{"type":44,"value":4856}," is intentionally different from the legacy extension's ",{"type":39,"tag":70,"props":4858,"children":4860},{"className":4859},[],[4861],{"type":44,"value":826},{"type":44,"value":4863},". The two coexist so a project mid-migration doesn't break. Don't rename between them.",{"type":39,"tag":79,"props":4865,"children":4867},{"id":4866},"preview-branching",[4868],{"type":44,"value":4869},"Preview branching",{"type":39,"tag":47,"props":4871,"children":4872},{},[4873],{"type":44,"value":4874},"Each deploy preview runs against its own database branch forked from production data — schema and data changes in a preview don't affect production until the branch is merged and published. Migrations run against the preview branch first (failures fail the preview, not production), and ad-hoc preview edits (UI data browser or a direct client) don't propagate to production — always express production changes as migrations.",{"type":39,"tag":79,"props":4876,"children":4878},{"id":4877},"changing-existing-data-production-or-preview",[4879],{"type":44,"value":4880},"Changing existing data — production or preview?",{"type":39,"tag":47,"props":4882,"children":4883},{},[4884,4886,4891,4893,4899,4901,4906],{"type":44,"value":4885},"A request to change existing data — \"rename this category\", \"fix the broken row for user X\" — is ",{"type":39,"tag":51,"props":4887,"children":4888},{},[4889],{"type":44,"value":4890},"ambiguous about where it should land",{"type":44,"value":4892},": production, or only the current preview branch. Resolve that fork ",{"type":39,"tag":4894,"props":4895,"children":4896},"em",{},[4897],{"type":44,"value":4898},"before",{"type":44,"value":4900}," changing anything: if the prompt didn't say, ask. When acting on someone's behalf, default to ",{"type":39,"tag":51,"props":4902,"children":4903},{},[4904],{"type":44,"value":4905},"not",{"type":44,"value":4907}," touching production unless they explicitly asked.",{"type":39,"tag":47,"props":4909,"children":4910},{},[4911,4913,4918],{"type":44,"value":4912},"Once it's production-bound, express it as a ",{"type":39,"tag":51,"props":4914,"children":4915},{},[4916],{"type":44,"value":4917},"DML migration",{"type":44,"value":4919},", never a direct write:",{"type":39,"tag":97,"props":4921,"children":4922},{},[4923,4961],{"type":39,"tag":101,"props":4924,"children":4925},{},[4926,4952,4954,4959],{"type":39,"tag":51,"props":4927,"children":4928},{},[4929,4931,4937,4938,4943,4944,4950],{"type":44,"value":4930},"Don't run the ",{"type":39,"tag":70,"props":4932,"children":4934},{"className":4933},[],[4935],{"type":44,"value":4936},"UPDATE",{"type":44,"value":475},{"type":39,"tag":70,"props":4939,"children":4941},{"className":4940},[],[4942],{"type":44,"value":189},{"type":44,"value":475},{"type":39,"tag":70,"props":4945,"children":4947},{"className":4946},[],[4948],{"type":44,"value":4949},"DELETE",{"type":44,"value":4951}," against production",{"type":44,"value":4953}," (or ad-hoc in a preview). Generate a DML migration in ",{"type":39,"tag":70,"props":4955,"children":4957},{"className":4956},[],[4958],{"type":44,"value":2622},{"type":44,"value":4960}," (raw SQL or Drizzle-generated) and commit it — the deploy applies it, like a schema migration.",{"type":39,"tag":101,"props":4962,"children":4963},{},[4964,4966,4971],{"type":44,"value":4965},"Tell the user you created a data migration; merging the branch applies it to production. Have them ",{"type":39,"tag":51,"props":4967,"children":4968},{},[4969],{"type":44,"value":4970},"verify in the deploy preview first",{"type":44,"value":4972}," (it runs against a forked copy of production data).",{"type":39,"tag":47,"props":4974,"children":4975},{},[4976,4978,4983],{"type":44,"value":4977},"Covers seed data, backfills, cleanups, CSV imports, and single-row fixes. Full detail in ",{"type":39,"tag":70,"props":4979,"children":4981},{"className":4980},[],[4982],{"type":44,"value":1304},{"type":44,"value":141},{"type":39,"tag":79,"props":4985,"children":4987},{"id":4986},"netlify-cli-commands-for-netlify-database",[4988],{"type":44,"value":4989},"Netlify CLI commands for Netlify Database",{"type":39,"tag":47,"props":4991,"children":4992},{},[4993,4994,4999,5000,5005,5007,5013],{"type":44,"value":418},{"type":39,"tag":70,"props":4995,"children":4997},{"className":4996},[],[4998],{"type":44,"value":424},{"type":44,"value":426},{"type":39,"tag":70,"props":5001,"children":5003},{"className":5002},[],[5004],{"type":44,"value":432},{"type":44,"value":5006},"). Requires CLI 26.0.0+. Most commands accept ",{"type":39,"tag":70,"props":5008,"children":5010},{"className":5009},[],[5011],{"type":44,"value":5012},"--json",{"type":44,"value":5014}," for machine-readable output — useful when scripting or reading results from an agent.",{"type":39,"tag":47,"props":5016,"children":5017},{},[5018,5020,5026,5027,5033,5034,5039,5040,5045,5046,5052,5053,5059,5060,5066,5067,5072,5074,5080,5082,5125],{"type":44,"value":5019},"Full per-command reference — ",{"type":39,"tag":70,"props":5021,"children":5023},{"className":5022},[],[5024],{"type":44,"value":5025},"init",{"type":44,"value":392},{"type":39,"tag":70,"props":5028,"children":5030},{"className":5029},[],[5031],{"type":44,"value":5032},"status",{"type":44,"value":392},{"type":39,"tag":70,"props":5035,"children":5037},{"className":5036},[],[5038],{"type":44,"value":4247},{"type":44,"value":392},{"type":39,"tag":70,"props":5041,"children":5043},{"className":5042},[],[5044],{"type":44,"value":4765},{"type":44,"value":4838},{"type":39,"tag":70,"props":5047,"children":5049},{"className":5048},[],[5050],{"type":44,"value":5051},"apply",{"type":44,"value":4838},{"type":39,"tag":70,"props":5054,"children":5056},{"className":5055},[],[5057],{"type":44,"value":5058},"pull",{"type":44,"value":4838},{"type":39,"tag":70,"props":5061,"children":5063},{"className":5062},[],[5064],{"type":44,"value":5065},"reset",{"type":44,"value":400},{"type":39,"tag":70,"props":5068,"children":5070},{"className":5069},[],[5071],{"type":44,"value":5065},{"type":44,"value":5073}," — is in ",{"type":39,"tag":70,"props":5075,"children":5077},{"className":5076},[],[5078],{"type":44,"value":5079},"references\u002Fcli-commands.md",{"type":44,"value":5081},". The one rule that applies across all of them: ",{"type":39,"tag":51,"props":5083,"children":5084},{},[5085,5087,5092,5093,5098,5099,5104,5105,5110,5112,5117,5118,5123],{"type":44,"value":5086},"never run DDL (",{"type":39,"tag":70,"props":5088,"children":5090},{"className":5089},[],[5091],{"type":44,"value":651},{"type":44,"value":475},{"type":39,"tag":70,"props":5094,"children":5096},{"className":5095},[],[5097],{"type":44,"value":658},{"type":44,"value":475},{"type":39,"tag":70,"props":5100,"children":5102},{"className":5101},[],[5103],{"type":44,"value":665},{"type":44,"value":475},{"type":39,"tag":70,"props":5106,"children":5108},{"className":5107},[],[5109],{"type":44,"value":672},{"type":44,"value":5111},") through ",{"type":39,"tag":70,"props":5113,"children":5115},{"className":5114},[],[5116],{"type":44,"value":4247},{"type":44,"value":392},{"type":39,"tag":70,"props":5119,"children":5121},{"className":5120},[],[5122],{"type":44,"value":473},{"type":44,"value":5124},", or any direct connection",{"type":44,"value":5126}," — schema changes go through migration files.",{"type":39,"tag":79,"props":5128,"children":5130},{"id":5129},"iterating-on-migrations",[5131],{"type":44,"value":5132},"Iterating on migrations",{"type":39,"tag":47,"props":5134,"children":5135},{},[5136],{"type":44,"value":5137},"When a migration you generated needs to change, what you do depends on whether it's been applied anywhere yet:",{"type":39,"tag":97,"props":5139,"children":5140},{},[5141,5151],{"type":39,"tag":101,"props":5142,"children":5143},{},[5144,5149],{"type":39,"tag":51,"props":5145,"children":5146},{},[5147],{"type":44,"value":5148},"Already applied",{"type":44,"value":5150}," to any database (local dev DB, a preview branch, or production) → treat as immutable. Roll forward with a new migration that applies the correction.",{"type":39,"tag":101,"props":5152,"children":5153},{},[5154,5159,5161,5167,5169,5174,5176,5181],{"type":39,"tag":51,"props":5155,"children":5156},{},[5157],{"type":44,"value":5158},"Only on disk",{"type":44,"value":5160}," (not yet applied anywhere) → don't edit the SQL or snapshot files by hand. Run ",{"type":39,"tag":70,"props":5162,"children":5164},{"className":5163},[],[5165],{"type":44,"value":5166},"netlify database migrations reset",{"type":44,"value":5168},", update ",{"type":39,"tag":70,"props":5170,"children":5172},{"className":5171},[],[5173],{"type":44,"value":171},{"type":44,"value":5175},", then re-run ",{"type":39,"tag":70,"props":5177,"children":5179},{"className":5178},[],[5180],{"type":44,"value":2670},{"type":44,"value":5182},". Hand-editing desyncs Drizzle Kit's internal state and tends to produce broken migrations on the next generate.",{"type":39,"tag":79,"props":5184,"children":5186},{"id":5185},"local-development",[5187],{"type":44,"value":5188},"Local development",{"type":39,"tag":47,"props":5190,"children":5191},{},[5192,5198,5200,5205],{"type":39,"tag":70,"props":5193,"children":5195},{"className":5194},[],[5196],{"type":44,"value":5197},"netlify dev",{"type":44,"value":5199}," runs against a local Postgres-compatible database — no remote connection, no risk to production. The local DB is the only one you migrate yourself (",{"type":39,"tag":70,"props":5201,"children":5203},{"className":5202},[],[5204],{"type":44,"value":609},{"type":44,"value":1118},{"type":39,"tag":79,"props":5207,"children":5209},{"id":5208},"common-mistakes",[5210],{"type":44,"value":5211},"Common mistakes",{"type":39,"tag":1059,"props":5213,"children":5214},{},[5215,5264,5289],{"type":39,"tag":101,"props":5216,"children":5217},{},[5218,5228,5230,5235,5236,5241,5243,5248,5250,5255,5257,5262],{"type":39,"tag":51,"props":5219,"children":5220},{},[5221,5223],{"type":44,"value":5222},"Missing ",{"type":39,"tag":70,"props":5224,"children":5226},{"className":5225},[],[5227],{"type":44,"value":223},{"type":44,"value":5229}," — ",{"type":39,"tag":70,"props":5231,"children":5233},{"className":5232},[],[5234],{"type":44,"value":244},{"type":44,"value":475},{"type":39,"tag":70,"props":5237,"children":5239},{"className":5238},[],[5240],{"type":44,"value":266},{"type":44,"value":5242}," must be ",{"type":39,"tag":70,"props":5244,"children":5246},{"className":5245},[],[5247],{"type":44,"value":223},{"type":44,"value":5249},"; ",{"type":39,"tag":70,"props":5251,"children":5253},{"className":5252},[],[5254],{"type":44,"value":342},{"type":44,"value":5256}," lacks the ",{"type":39,"tag":70,"props":5258,"children":5260},{"className":5259},[],[5261],{"type":44,"value":350},{"type":44,"value":5263}," adapter.",{"type":39,"tag":101,"props":5265,"children":5266},{},[5267,5272,5274,5280,5282,5287],{"type":39,"tag":51,"props":5268,"children":5269},{},[5270],{"type":44,"value":5271},"Wrong output dir",{"type":44,"value":5273}," — set ",{"type":39,"tag":70,"props":5275,"children":5277},{"className":5276},[],[5278],{"type":44,"value":5279},"out: \"netlify\u002Fdatabase\u002Fmigrations\"",{"type":44,"value":5281}," in ",{"type":39,"tag":70,"props":5283,"children":5285},{"className":5284},[],[5286],{"type":44,"value":933},{"type":44,"value":5288},"; migrations elsewhere aren't applied by the deploy.",{"type":39,"tag":101,"props":5290,"children":5291},{},[5292,5297,5299,5304,5305,5311,5313,5318],{"type":39,"tag":51,"props":5293,"children":5294},{},[5295],{"type":44,"value":5296},"Self-applying hosted migrations",{"type":44,"value":5298}," — never ",{"type":39,"tag":70,"props":5300,"children":5302},{"className":5301},[],[5303],{"type":44,"value":617},{"type":44,"value":475},{"type":39,"tag":70,"props":5306,"children":5308},{"className":5307},[],[5309],{"type":44,"value":5310},"push",{"type":44,"value":5312}," or DDL via ",{"type":39,"tag":70,"props":5314,"children":5316},{"className":5315},[],[5317],{"type":44,"value":4247},{"type":44,"value":5319}," against production\u002Fpreview; commit migration files and let the deploy apply them.",{"type":39,"tag":79,"props":5321,"children":5323},{"id":5322},"references",[5324],{"type":44,"value":5325},"References",{"type":39,"tag":97,"props":5327,"children":5328},{},[5329,5339,5389,5404,5415,5432],{"type":39,"tag":101,"props":5330,"children":5331},{},[5332,5337],{"type":39,"tag":509,"props":5333,"children":5334},{"href":1304},[5335],{"type":44,"value":5336},"Migrations",{"type":44,"value":5338}," — full migration workflow, expand-and-contract for breaking changes, and production DML",{"type":39,"tag":101,"props":5340,"children":5341},{},[5342,5347,5348,5353,5354,5359,5360,5365,5366,5371,5372,5377,5378,5383,5384],{"type":39,"tag":509,"props":5343,"children":5344},{"href":5079},[5345],{"type":44,"value":5346},"CLI commands",{"type":44,"value":5229},{"type":39,"tag":70,"props":5349,"children":5351},{"className":5350},[],[5352],{"type":44,"value":5025},{"type":44,"value":392},{"type":39,"tag":70,"props":5355,"children":5357},{"className":5356},[],[5358],{"type":44,"value":5032},{"type":44,"value":392},{"type":39,"tag":70,"props":5361,"children":5363},{"className":5362},[],[5364],{"type":44,"value":4247},{"type":44,"value":400},{"type":39,"tag":70,"props":5367,"children":5369},{"className":5368},[],[5370],{"type":44,"value":4765},{"type":44,"value":4838},{"type":39,"tag":70,"props":5373,"children":5375},{"className":5374},[],[5376],{"type":44,"value":5051},{"type":44,"value":4838},{"type":39,"tag":70,"props":5379,"children":5381},{"className":5380},[],[5382],{"type":44,"value":5058},{"type":44,"value":4838},{"type":39,"tag":70,"props":5385,"children":5387},{"className":5386},[],[5388],{"type":44,"value":5065},{"type":39,"tag":101,"props":5390,"children":5391},{},[5392,5397,5399],{"type":39,"tag":509,"props":5393,"children":5395},{"href":5394},"references\u002Flocal-dev.md",[5396],{"type":44,"value":5188},{"type":44,"value":5398}," — running against a local Postgres-compatible database with ",{"type":39,"tag":70,"props":5400,"children":5402},{"className":5401},[],[5403],{"type":44,"value":5197},{"type":39,"tag":101,"props":5405,"children":5406},{},[5407,5413],{"type":39,"tag":509,"props":5408,"children":5410},{"href":5409},"references\u002Foperational-footguns.md",[5411],{"type":44,"value":5412},"Operational footguns",{"type":44,"value":5414}," — client reuse, cold starts, preview-data (PII) exposure, legacy-extension deletion",{"type":39,"tag":101,"props":5416,"children":5417},{},[5418,5430],{"type":39,"tag":509,"props":5419,"children":5420},{"href":893},[5421,5423,5428],{"type":44,"value":5422},"Legacy ",{"type":39,"tag":70,"props":5424,"children":5426},{"className":5425},[],[5427],{"type":44,"value":801},{"type":44,"value":5429}," extension",{"type":44,"value":5431}," — recognizing and coexisting with the older extension",{"type":39,"tag":101,"props":5433,"children":5434},{},[5435,5440,5442,5447],{"type":39,"tag":509,"props":5436,"children":5437},{"href":718},[5438],{"type":44,"value":5439},"Migrating from the extension",{"type":44,"value":5441}," — switching from ",{"type":39,"tag":70,"props":5443,"children":5445},{"className":5444},[],[5446],{"type":44,"value":801},{"type":44,"value":5448}," or other external Postgres, including the one-time data import",{"type":39,"tag":5450,"props":5451,"children":5452},"style",{},[5453],{"type":44,"value":5454},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5456,"total":3308},[5457,5476,5488,5505,5520,5535,5550,5567,5577,5584,5597,5612],{"slug":5458,"name":5458,"fn":5459,"description":5460,"org":5461,"tags":5462,"stars":5473,"repoUrl":5474,"updatedAt":5475},"configure-axis","configure AXIS agent evaluation scenarios","Author AXIS (Agent Experience Index Score) scenarios and axis.config.json for a project. Use when the user asks to set up AXIS, add a scenario, write or edit axis.config.json, or evaluate an AI agent with AXIS.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5463,5466,5469,5472],{"name":5464,"slug":5465,"type":15},"Agents","agents",{"name":5467,"slug":5468,"type":15},"Configuration","configuration",{"name":5470,"slug":5471,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},32,"https:\u002F\u002Fgithub.com\u002Fnetlify\u002Faxis","2026-07-20T05:59:47.468757",{"slug":5477,"name":5477,"fn":5478,"description":5479,"org":5480,"tags":5481,"stars":5473,"repoUrl":5474,"updatedAt":5487},"using-axis","run and interpret AXIS reports","Run AXIS, read its reports, navigate its project layout, and interpret scores. Use when the user asks to run AXIS, invoke the CLI, compare runs, explain a score, find a regression, manage baselines, or understand where AXIS writes its files.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5482,5485,5486],{"name":5483,"slug":5484,"type":15},"CLI","cli",{"name":5470,"slug":5471,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:40:13.443461",{"slug":5489,"name":5489,"fn":5490,"description":5491,"org":5492,"tags":5493,"stars":23,"repoUrl":24,"updatedAt":5504},"netlify-access-control","manage Netlify site access control","Use when the task involves controlling who can reach a Netlify site, or telling Netlify Identity apart from Secure Access. Trigger whenever the user wants to lock a site or deploy to their company\u002Fteam, restrict access to employees only, build an internal or employees-only app, set up password protection, SSO, or SAML, asks \"who can access my site\", or is confused about Netlify Identity vs Secure Access vs team login vs OAuth providers. Routes the request to the right layer — app-level Identity, site-visitor Password Protection, the Auth0 extension, or Team\u002FOrg SAML SSO — and explains the two-layer (perimeter + in-app identity) pattern and its double-login tradeoff. For building the app-level auth itself, use the netlify-identity skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5494,5497,5498,5501],{"name":5495,"slug":5496,"type":15},"Access Control","access-control",{"name":9,"slug":8,"type":15},{"name":5499,"slug":5500,"type":15},"Permissions","permissions",{"name":5502,"slug":5503,"type":15},"Security","security","2026-07-14T05:40:29.082149",{"slug":5506,"name":5506,"fn":5507,"description":5508,"org":5509,"tags":5510,"stars":23,"repoUrl":24,"updatedAt":5519},"netlify-agent-runner","run AI agent tasks on Netlify","Run AI agent tasks remotely on Netlify using Claude, Codex, or Gemini. Use when the user wants to run an AI agent on their site, get a second opinion from another model, or delegate development tasks to run remotely against their repo.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5511,5512,5515,5518],{"name":5464,"slug":5465,"type":15},{"name":5513,"slug":5514,"type":15},"Automation","automation",{"name":5516,"slug":5517,"type":15},"LLM","llm",{"name":9,"slug":8,"type":15},"2026-07-17T05:30:19.462913",{"slug":5521,"name":5521,"fn":5522,"description":5523,"org":5524,"tags":5525,"stars":23,"repoUrl":24,"updatedAt":5534},"netlify-ai-gateway","route AI requests via Netlify AI Gateway","Reference for Netlify AI Gateway — the managed proxy that routes calls to OpenAI, Anthropic, and Google Gemini SDKs without provider API keys. Use this skill any time the user wants to add AI on a Netlify site (chat, completion, reasoning, image generation, image-to-image edit\u002Fstylize), choose or change a model, wire up the OpenAI \u002F Anthropic \u002F @google\u002Fgenai SDK, decide which provider to use for an image-gen feature (it's Gemini-only on the gateway), or debug \"model not found\" \u002F \"API key missing\" against the gateway. Required reading before pinning a model — the gateway exposes a curated subset, not every provider model.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5526,5529,5532,5533],{"name":5527,"slug":5528,"type":15},"AI Infrastructure","ai-infrastructure",{"name":5530,"slug":5531,"type":15},"API Development","api-development",{"name":5516,"slug":5517,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T05:30:13.14555",{"slug":5536,"name":5536,"fn":5537,"description":5538,"org":5539,"tags":5540,"stars":23,"repoUrl":24,"updatedAt":5549},"netlify-blobs","manage file storage with Netlify Blobs","Guide for using Netlify Blobs for file and asset storage — images, documents, uploads, exports, cached binary artifacts. Covers getStore(), CRUD operations, metadata, listing, deploy-scoped vs site-scoped stores, and local development. Do NOT use Blobs as a dynamic data store — use Netlify Database for that.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5541,5542,5545,5546],{"name":13,"slug":14,"type":15},{"name":5543,"slug":5544,"type":15},"File Storage","file-storage",{"name":9,"slug":8,"type":15},{"name":5547,"slug":5548,"type":15},"Storage","storage","2026-07-17T05:30:16.503306",{"slug":5551,"name":5551,"fn":5552,"description":5553,"org":5554,"tags":5555,"stars":23,"repoUrl":24,"updatedAt":5566},"netlify-caching","configure CDN caching on Netlify","Guide for controlling caching on Netlify's CDN. Use when configuring cache headers, setting up stale-while-revalidate, implementing on-demand cache purge, or understanding Netlify's CDN caching behavior. Covers Cache-Control, Netlify-CDN-Cache-Control, cache tags, durable cache, and framework-specific caching patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5556,5559,5562,5563],{"name":5557,"slug":5558,"type":15},"Caching","caching",{"name":5560,"slug":5561,"type":15},"Deployment","deployment",{"name":9,"slug":8,"type":15},{"name":5564,"slug":5565,"type":15},"Performance","performance","2026-07-14T05:40:20.066717",{"slug":5568,"name":5568,"fn":5569,"description":5570,"org":5571,"tags":5572,"stars":23,"repoUrl":24,"updatedAt":5576},"netlify-config","configure Netlify site settings","Reference for netlify.toml configuration and site environment variables. Use when configuring build settings, redirects, rewrites, headers, deploy contexts, the `[dev]` block that controls `netlify dev` (command, port, targetPort, framework), or any site-level configuration — and when managing environment variables or secrets with the Netlify CLI, including scoping values to specific deploy contexts. Covers the complete netlify.toml syntax including redirects with splats\u002Fconditions, headers, deploy contexts, functions config, edge functions config, and the `[dev]` block (including when `framework` must be `\"#custom\"` — required when both a custom `command` and `targetPort` are set).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5573,5574,5575],{"name":5467,"slug":5468,"type":15},{"name":5560,"slug":5561,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T05:30:21.284801",{"slug":4,"name":4,"fn":5,"description":6,"org":5578,"tags":5579,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5580,5581,5582,5583],{"name":13,"slug":14,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"slug":5585,"name":5585,"fn":5586,"description":5587,"org":5588,"tags":5589,"stars":23,"repoUrl":24,"updatedAt":5596},"netlify-deploy","deploy and host projects on Netlify","Deploy, host, and publish web projects on Netlify with the Netlify CLI. Use when the user wants to deploy a site or repository to Netlify, link a local project to a Netlify site, ship a production or preview\u002Fdraft deploy, set up Git-based continuous deployment, run a manual or local deploy, configure CI deploys, or troubleshoot a failed or misconfigured deploy. Also use to view or tail a deployed site's runtime logs — function and edge-function output, deploy logs — via `netlify logs` when debugging what a live site is doing (recent errors, recent activity, streaming output).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5590,5591,5592,5593],{"name":5483,"slug":5484,"type":15},{"name":5560,"slug":5561,"type":15},{"name":9,"slug":8,"type":15},{"name":5594,"slug":5595,"type":15},"Web Development","web-development","2026-07-17T05:30:14.218977",{"slug":5598,"name":5598,"fn":5599,"description":5600,"org":5601,"tags":5602,"stars":23,"repoUrl":24,"updatedAt":5611},"netlify-edge-functions","write Netlify Edge Functions","Guide for writing Netlify Edge Functions. Use when building middleware, geolocation-based logic, request\u002Fresponse manipulation, authentication checks, A\u002FB testing, or any low-latency edge compute. Covers Deno runtime, context.next() middleware pattern, geolocation, and when to choose edge vs serverless.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5603,5606,5609,5610],{"name":5604,"slug":5605,"type":15},"Edge Functions","edge-functions",{"name":5607,"slug":5608,"type":15},"Middleware","middleware",{"name":9,"slug":8,"type":15},{"name":5564,"slug":5565,"type":15},"2026-07-14T05:40:34.147865",{"slug":5613,"name":5613,"fn":5614,"description":5615,"org":5616,"tags":5617,"stars":23,"repoUrl":24,"updatedAt":5626},"netlify-forms","handle HTML forms with Netlify","Guide for using Netlify Forms for HTML form handling. Use when adding contact forms, feedback forms, file upload forms, or any form that should be collected by Netlify. Covers the data-netlify attribute, spam filtering, AJAX submissions, file uploads, notifications, and the submissions API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5618,5621,5624,5625],{"name":5619,"slug":5620,"type":15},"Forms","forms",{"name":5622,"slug":5623,"type":15},"HTML","html",{"name":9,"slug":8,"type":15},{"name":5594,"slug":5595,"type":15},"2026-07-14T05:40:16.075367",{"items":5628,"total":3190},[5629,5636,5643,5650,5657,5664,5670],{"slug":5489,"name":5489,"fn":5490,"description":5491,"org":5630,"tags":5631,"stars":23,"repoUrl":24,"updatedAt":5504},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5632,5633,5634,5635],{"name":5495,"slug":5496,"type":15},{"name":9,"slug":8,"type":15},{"name":5499,"slug":5500,"type":15},{"name":5502,"slug":5503,"type":15},{"slug":5506,"name":5506,"fn":5507,"description":5508,"org":5637,"tags":5638,"stars":23,"repoUrl":24,"updatedAt":5519},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5639,5640,5641,5642],{"name":5464,"slug":5465,"type":15},{"name":5513,"slug":5514,"type":15},{"name":5516,"slug":5517,"type":15},{"name":9,"slug":8,"type":15},{"slug":5521,"name":5521,"fn":5522,"description":5523,"org":5644,"tags":5645,"stars":23,"repoUrl":24,"updatedAt":5534},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5646,5647,5648,5649],{"name":5527,"slug":5528,"type":15},{"name":5530,"slug":5531,"type":15},{"name":5516,"slug":5517,"type":15},{"name":9,"slug":8,"type":15},{"slug":5536,"name":5536,"fn":5537,"description":5538,"org":5651,"tags":5652,"stars":23,"repoUrl":24,"updatedAt":5549},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5653,5654,5655,5656],{"name":13,"slug":14,"type":15},{"name":5543,"slug":5544,"type":15},{"name":9,"slug":8,"type":15},{"name":5547,"slug":5548,"type":15},{"slug":5551,"name":5551,"fn":5552,"description":5553,"org":5658,"tags":5659,"stars":23,"repoUrl":24,"updatedAt":5566},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5660,5661,5662,5663],{"name":5557,"slug":5558,"type":15},{"name":5560,"slug":5561,"type":15},{"name":9,"slug":8,"type":15},{"name":5564,"slug":5565,"type":15},{"slug":5568,"name":5568,"fn":5569,"description":5570,"org":5665,"tags":5666,"stars":23,"repoUrl":24,"updatedAt":5576},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5667,5668,5669],{"name":5467,"slug":5468,"type":15},{"name":5560,"slug":5561,"type":15},{"name":9,"slug":8,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":5671,"tags":5672,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5673,5674,5675,5676],{"name":13,"slug":14,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15}]