Skip to content

Zero-Config Auto-Discovery

DevDb Pro automatically discovers and loads your database without requiring any manual configuration. This zero-config approach works by intelligently detecting database settings from your project's configuration files.

How It Works

DevDb scans your workspace for known configuration patterns and extracts database connection details automatically. This means you can start browsing your database immediately after opening your project in VS Code.

Supported Environments

DDEV Projects

DevDb automatically discovers databases in DDEV-managed applications.

Requirements:

  • DDEV installed and configured
  • Project initialized with DDEV

Detection:

  • Reads DDEV configuration files
  • Automatically connects to containerized databases

Laravel

DevDb supports Laravel projects with minimal setup.

Supported Configurations:

  • SQLite (default local database)
  • MySQL/MariaDB (via .env)
  • PostgreSQL (via .env)
  • Microsoft SQL Server (via .env)

Detection:

  • Reads .env file for database credentials
  • Supports containerized setups (Laravel Sail)
  • Compatible with dev containers

Example .env:

env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=myapp
DB_USERNAME=root
DB_PASSWORD=secret

Django

Python Django projects with standard database configuration.

Supported Databases:

  • SQLite
  • MySQL
  • PostgreSQL

Detection:

  • Reads settings.py for DATABASES configuration
  • Supports default Django database settings

Example settings.py:

python
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'myapp',
        'USER': 'root',
        'PASSWORD': 'secret',
        'HOST': '127.0.0.1',
        'PORT': '3306',
    }
}

Ruby on Rails

Rails projects with standard database configuration.

Supported Databases:

  • SQLite
  • MySQL
  • PostgreSQL

Detection:

  • Reads config/database.yml
  • Supports development, test, and production environments

Example config/database.yml:

yaml
development:
  adapter: mysql2
  encoding: utf8mb4
  database: myapp_development
  pool: 5
  username: root
  password: secret
  host: 127.0.0.1
  port: 3306

Adonis

AdonisJS projects using Lucid ORM.

Supported Databases:

  • MySQL
  • PostgreSQL

Detection:

  • Reads .env file for database credentials
  • Works with default Lucid ORM configuration

Example .env:

env
DB_CONNECTION=mysql
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=secret
MYSQL_DB_NAME=myapp

Configuration Priority

When DevDb detects your database:

  1. Environment variables (.env, .env.local, etc.)
  2. Framework-specific config files (settings.py, database.yml, etc.)
  3. Container configuration (Docker, DDEV, Laravel Sail)

Troubleshooting Auto-Discovery

Database Not Detected

If your database isn't automatically discovered:

  1. Check your configuration files exist and are in the workspace root
  2. Verify credentials are correct in your config files
  3. Ensure the database is running and accessible
  4. Review the DevDb output panel for any error messages

Multiple Databases

If your project uses multiple databases:

  • DevDb loads all detected databases
  • Switch between them in the DevDb sidebar
  • Each database appears as a separate connection

Custom Configuration

For environments not supported by auto-discovery, use a manual configuration file.

Benefits of Zero-Config

  • No setup required - Works immediately after installation
  • Stays in sync - Automatically updates when config files change
  • Framework-aware - Understands different framework conventions
  • Multi-environment - Supports dev containers and containerized setups
  • Team-friendly - Works the same way for all team members

Next Steps

DevDb Pro - Zero-config database management for VS Code