{
  "slug": "netlify-database-command-provisions-and-manages-netlify-database-f515c21f6d76",
  "title": "netlify database command provisions and manages Netlify Database",
  "tools": [
    "netlify"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-28T14:38:50.000Z",
  "announced_at": "2026-04-28T14:38:50.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a linked project needs Netlify Database setup, run `netlify database init` for interactive setup or `--yes` to accept defaults; use the database subcommands to inspect and manage the local database and migrations.",
    "examples": [
      "netlify database init --yes",
      "netlify database status --branch <branch>",
      "netlify database migrations apply"
    ],
    "gotchas": [
      "Version: v26.0.0",
      "--yes: For `database init`, skip prompts and accept defaults.",
      "--branch <branch>: For `database status`, query a named Netlify branch; defaults to the local development database.",
      "--show-credentials: For `database status`, include the full connection string, including username and password.",
      "--json: For `database status`, output the result as JSON.",
      "--to <name>: For `database migrations apply`, apply migrations up to a migration name or prefix; if omitted, apply all pending migrations.",
      "--branch <branch>: For `database migrations pull`, pull migrations for the named branch; defaults to `production`. With `--branch` and no value, use the local Git branch.",
      "--force: For `database migrations pull`, skip the confirmation prompt before overwriting local migration files.",
      "--description <description>: For `database migrations new`, set the migration purpose used to generate the file name; omitted value prompts interactively.",
      "--scheme <scheme>: For `database migrations new`, choose the migration prefix scheme: `sequential` or `timestamp`. The docs do not say these are mutually exclusive with other options.",
      "filter: For monorepos, specify the application in which to run the root command.",
      "debug: Print debugging information for the root command.",
      "auth: Netlify auth token; can run the root command without logging in.",
      "Prerequisite: Node.js 20.12.2 or later and Netlify CLI 26.0.0 or later.",
      "Prerequisite: Install the Netlify CLI; the docs show `npm install -g netlify-cli`.",
      "`database init` is interactive setup that installs the package, scaffolds a starter migration, and verifies the database.",
      "`database reset` resets the local development database, removing all data and tables.",
      "The `branch` flag selects a Netlify branch and defaults to the local development database.",
      "`auth` can be used to run the command without logging in.",
      "Docs conflict: The release note describes bare `netlify database` as provisioning a production-ready database. The current CLI reference describes `netlify database init` as project setup and says the listed commands interact with the local database; it does not document bare `netlify database` as provisioning a database."
    ]
  },
  "why_it_matters": "Provision or manage a Netlify Database for a repository's application using the Netlify CLI.",
  "sources": [
    "https://github.com/netlify/cli/releases/tag/v26.0.0",
    "https://github.com/netlify/cli/pull/8212",
    "https://docs.netlify.com/build/data-and-storage/netlify-database/cli/"
  ],
  "rank": 0.98026,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-278358b121e7ac78-0:gate",
    "evidence_hash": "ac711ce98cdb6a49662bbe3123fb29c7276cc5e697193b5c386fab937b9fa83e"
  },
  "review": {
    "draft_hash": "e27016baf774797e38869d9b823fb0e097995f884e10a313c03822150ffed546",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
