Database not configured

Cloudflare's D1 (SQLite at the edge) is free for small projects but needs a one-time setup before this page becomes live.

  1. Create the database. In Cloudflare Dash → Storage & Databases → D1, click Create. Name it (e.g. ownsite). Copy the Database ID shown on the next page.
  2. Add the binding to wrangler.jsonc. Inside the existing config, after "assets", add:
    "d1_databases": [
      {
        "binding": "DB",
        "database_name": "ownsite",
        "database_id": "<paste-the-id-here>"
      }
    ]
  3. Commit + push. Cloudflare rebuilds. After that, this page shows the table list and a query editor.
  4. Create your first table. Once the page goes live, run something like:
    CREATE TABLE guestbook (
      id INTEGER PRIMARY KEY AUTOINCREMENT,
      name TEXT NOT NULL,
      message TEXT NOT NULL,
      created_at TEXT DEFAULT CURRENT_TIMESTAMP
    );

Tables

    Quick queries

      Query

      ⌘/Ctrl+Enter to run · one statement at a time

      Results

      No query run yet.