database

Automate safe database schema evolution with Drizzle SQL and TypeScript startup migrations.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Norfolk-Group/H-Analytics --skill database-norfolk-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database
Source: https://github.com/Norfolk-Group/H-Analytics/tree/main/.claude/archive/agents-skills-snapshot/database
Command: npx skills add https://github.com/Norfolk-Group/H-Analytics --skill database-norfolk-group

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Schema migration system for the hospitality financial model addresses the need to safely evolve the database schema across Drizzle SQL migrations and TypeScript startup migrations, ensuring idempotency and traceability.

Core Features & Use Cases

  • Dual migration system: canonical SQL migrations and runtime startup migrations to apply schema changes safely.
  • Clear naming conventions, migration orchestration order, and an idempotency-first workflow to prevent drift in dev and production.
  • Use cases include adding columns, creating tables, modifying schemas, and maintaining a reliable migration journal during continuous deployment.

Quick Start

Install or update the schema definitions in shared/schema/ and run the standard migration workflow to apply changes safely on startup.

Frequently Asked Questions about database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run safe database schema migrations with Drizzle and TypeScript?

Schema migrations are automated through a dual system of canonical SQL migrations and TypeScript runtime startup migrations, ensuring idempotency and traceability across development, staging, and production environments.

What is the best way to ensure idempotency during PostgreSQL schema evolution?

Idempotency is guaranteed by enforcing a clear migration orchestration order and an idempotency-first workflow, preventing schema drift and ensuring repeated migration applications yield the same result without breaking builds.

Does this migration system support adding columns and creating tables without downtime?

Yes, the dual migration system supports adding columns, creating tables, and modifying schemas safely. It uses a separate migrations folder and server startup migrations to apply changes across staging and production without breaking builds.

Can I use TypeScript startup migrations alongside Drizzle SQL migrations?

Yes, the system is designed as a dual migration framework, allowing both canonical Drizzle SQL migrations and TypeScript runtime startup scripts to apply schema changes safely and orchestrate updates.

How do I start applying schema changes to a shared schema folder?

To start applying schema changes, install or update the schema definitions in the shared/schema/ directory. Run the standard migration workflow to safely apply the updates on server startup.

Why do I need a separate migrations folder for database schema evolution?

A separate migrations folder is needed to maintain a reliable migration journal and clear naming conventions, preventing schema drift in dev and production while ensuring traceability during continuous deployment.