All Docs/Database Connection

Database Connection

Connect your project's database so the AI understands your data model. DevSpec reads your database schema: tables, columns, types, relationships, foreign keys, indexes, enums, functions, and Row Level Security policies. It also checks database health: security advisors, performance advisors, and installed extensions.

Connecting a Database

From your project page, click "Connect Database." Enter your database connection string. DevSpec will read the schema and store it securely. It does not read or store your actual data.

Steps

  • Open your project page.
  • Click "Connect Database" in the Databases tab.
  • Enter your database connection string.
  • DevSpec reads and stores the schema securely.

DevSpec reads your database schema only. It never reads, queries, or stores your actual data.

Schema Awareness

Schema snapshots are stored so the AI always has up-to-date knowledge of your data model. Once connected, the AI can reference your tables, columns, and relationships when discussing your project. During sessions, you can ask the AI about your database and it will reference actual schema information, not guess. This is especially useful for questions about data modeling, queries, and migrations.

Schema Freshness

DevSpec periodically checks if the schema has changed and re-syncs automatically. You don't need to manually reconnect or refresh because your schema snapshots stay current so the AI always works with the latest version of your data model.