How the database works
The agent writes database code as part of your website. When your site needs to store data (user accounts, form submissions, product listings, blog posts, anything), the agent creates the tables, writes the queries, and handles migrations.What the agent handles
- Creating tables and defining schemas
- Writing queries for your application logic
- Running database migrations on deploy
- Setting up relationships between tables
What you describe
- What data your app needs to store
- How users interact with that data
- What pages or features need database access
- Any specific data requirements
Querying from the dashboard
You can run SQL queries directly from the Runable dashboard for debugging or inspecting data.
Migrations
When you change the database schema (add tables, modify columns), the agent writes migration files. Migrations run automatically during deployment. This ensures your production database stays in sync with your code.What you cannot do
- You cannot connect an external database (PostgreSQL, MySQL, etc.) in place of D1. The built-in database is SQLite via Cloudflare D1.
- You cannot access the database from outside your website. It is only accessible from your website’s backend code.
- You cannot download a database backup from the dashboard.
- You cannot create multiple databases for the same website. Each website gets one database.

.png?fit=max&auto=format&n=J3TfNmZhqEoKcaaO&q=85&s=468b5adb026aa33181cc81ab54ab68db)