Skip to main content

Database Setup

SHIELD uses PostgreSQL for policy metadata storage.

Options

Serverless PostgreSQL with generous free tier. Setup:
  1. Sign up at neon.tech
  2. Create new project
  3. Create database
  4. Copy connection string
Connection String:

2. Supabase

PostgreSQL + additional features. Setup:
  1. Sign up at supabase.com
  2. Create new project
  3. Get connection string from Settings → Database

3. Local PostgreSQL

For development:

Schema

Create tables:

Migration

Use a migration tool:

Backup

Automated (Neon)

Neon provides automatic backups. Configure retention in dashboard.

Manual

Security

  • Use SSL/TLS for connections
  • Restrict IP allowlist
  • Rotate credentials regularly
  • Enable query logging
  • Never commit credentials

Connection Pooling

Use PgBouncer for production: