Files
the_order/packages/database
defiQUG 6a8582e54d feat: comprehensive project structure improvements and Cloud for Sovereignty landing zone
- Add Cloud for Sovereignty landing zone architecture and deployment
- Implement complete legal document management system
- Reorganize documentation with improved navigation
- Add infrastructure improvements (Dockerfiles, K8s, monitoring)
- Add operational improvements (graceful shutdown, rate limiting, caching)
- Create comprehensive project structure documentation
- Add Azure deployment automation scripts
- Improve repository navigation and organization
2025-11-13 09:32:55 -08:00
..

@the-order/database

PostgreSQL database client and utilities for The Order.

Usage

import { getPool, query, healthCheck } from '@the-order/database';

// Initialize pool
const pool = getPool({
  connectionString: process.env.DATABASE_URL,
  max: 20,
});

// Execute query
const result = await query('SELECT * FROM users WHERE id = $1', [userId]);

// Health check
const isHealthy = await healthCheck();

Migrations

Migrations are handled by node-pg-migrate:

# Create a new migration
pnpm --filter @the-order/database migrate:create migration-name

# Run migrations
pnpm --filter @the-order/database migrate up

# Rollback migrations
pnpm --filter @the-order/database migrate down