> ## Documentation Index
> Fetch the complete documentation index at: https://hyperscape-ai-mintlify-docs-update.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables update

# Environment Variables Update (Feb 2026)

## New Environment Variables

### SKIP\_MIGRATIONS

**Added in**: Commit `eb8652a` (Feb 22, 2026)\
**Location**: `packages/server/.env`\
**Purpose**: Skip server's built-in migration system when using drizzle-kit push

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
# Skip server's built-in migration system (advanced use only)
# Set to "true" when using drizzle-kit push for declarative schema creation
# Useful in CI/test environments to avoid migration journal conflicts
# WARNING: Only use this if you know what you're doing
SKIP_MIGRATIONS=true
```

**Use Case**: Integration tests in CI

The server's built-in migration system has FK ordering issues (migration 0050 references arena\_rounds from older migrations). In CI environments, `drizzle-kit push` creates the schema declaratively without these problems. Setting `SKIP_MIGRATIONS=true` bypasses the server's migration runner after push.

**Workflow**:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
# In CI (e.g., .github/workflows/integration.yml)
bunx drizzle-kit push              # Create schema declaratively
SKIP_MIGRATIONS=true bun run test  # Skip server migrations
```

**Migration 0050 Fix** (commit e4b6489):
Migration 0050 duplicated CREATE TABLE statements from earlier migrations (e.g., agent\_duel\_stats from 0039). Added `IF NOT EXISTS` to prevent 42P07 errors on fresh databases.

### Database Connection Tuning

**Added in**: Commit `8aaaf28` / `f7ab9f7` (Feb 22, 2026)

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
# Disable prepared statements for Supavisor pooler compatibility
# Required when using Supabase connection pooling (Supavisor)
# Prevents XX000 errors from prepared statement conflicts
# DATABASE_PREPARED_STATEMENTS=false
```

**Context**: Supavisor (Supabase's connection pooler) doesn't support prepared statements in transaction mode. Disabling them prevents `XX000` errors.

## Updated Documentation Locations

### Server Environment Variables

**File**: `packages/server/.env.example`

Add the following to the DATABASE CONFIGURATION section (after DATABASE\_URL):

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
# Skip server's built-in migration system (advanced use only)
# Set to "true" when using drizzle-kit push for declarative schema creation
# Useful in CI/test environments to avoid migration journal conflicts
# WARNING: Only use this if you know what you're doing
# SKIP_MIGRATIONS=true

# Disable prepared statements for Supavisor pooler compatibility
# Required when using Supabase connection pooling (Supavisor)
# Prevents XX000 errors from prepared statement conflicts
# DATABASE_PREPARED_STATEMENTS=false
```

### CI/CD Configuration

**File**: `.github/workflows/integration.yml`

The integration workflow now uses:

```yaml theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
- name: Push database schema
  run: bunx drizzle-kit push
  env:
    DATABASE_URL: ${{ env.DATABASE_URL }}

- name: Run integration tests
  run: bun test:integration
  env:
    SKIP_MIGRATIONS: true  # Skip server migrations after push
```

## Migration Best Practices

### Local Development

Use server's built-in migrations (default):

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
bun run dev  # Server runs migrations automatically
```

### CI/Test Environments

Use drizzle-kit push + SKIP\_MIGRATIONS:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
bunx drizzle-kit push
SKIP_MIGRATIONS=true bun run test
```

### Production

Use server's built-in migrations:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
# Migrations run automatically on server startup
bun start
```

Or use drizzle-kit migrate for manual control:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
cd packages/server
bunx drizzle-kit migrate
```

## Related Commits

* `eb8652a` - Add SKIP\_MIGRATIONS env var for CI integration tests
* `e4b6489` - Add IF NOT EXISTS to migration 0050 tables/indexes
* `8aaaf28` / `f7ab9f7` - Disable prepared statements for Supavisor pooler
* `b5d2494` - Remove drizzle-kit push from integration workflow
* `034f9c9` - Skip chain setup in CI, exclude evm-contracts tests
