data-model-changes

Guide auditable database schema migrations with drizzle and generated TypeScript types.

1.4k|162|Updated Sep 5, 2025
One-click install
npx skills add https://github.com/inkeep/agents --skill data-model-changes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-model-changes
Source: https://github.com/inkeep/agents/tree/main/.agents/skills/data-model-changes
Command: npx skills add https://github.com/inkeep/agents --skill data-model-changes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides safe, auditable modifications of the database schema across the Manage and Runtime databases used by the Inkeep Agent Framework.

Core Features & Use Cases

  • Schema governance: Enforces scope patterns (tenant/project/agent/subAgent) and ensures primary keys include scope fields.
  • Migration workflow: Guides generating, reviewing, and applying changes via drizzle migrations and changesets.
  • Validation & typings: Provides Zod schemas for select/insert/update and API variants, plus generated entity types for data access.
  • Use Case: When adding a new table or changing a column, follow the guide to generate migrations, update schemas, and deploy safely with versioned changesets.

Quick Start

Use the data-model-changes workflow to kick off a migration for a schema update, review the generated SQL, and apply it with the migration tool.

Frequently Asked Questions about data-model-changes

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

FAQPage Schema
How do I safely add a new table to a Postgres database using Drizzle ORM?

To safely add a new table to a Postgres database using Drizzle ORM, follow a schema migration workflow that generates SQL changesets, enforces scope-aware primary keys, and updates validation schemas for safe deployment.

What is the best way to manage schema migrations across multiple databases?

Managing schema migrations across multiple databases requires an auditable workflow that generates versioned changesets, reviews SQL output, and applies updates safely to ensure both manage and runtime databases stay synchronized.

How do I generate TypeScript types and Zod schemas for JSONB columns?

Generating TypeScript types and Zod schemas for JSONB columns involves using a data model workflow that automatically creates select, insert, and update validation variants alongside generated entity types for secure data access.

Does Drizzle ORM support scope-aware primary keys for multi-tenant databases?

Yes, Drizzle ORM can enforce scope-aware primary keys for multi-tenant databases by applying schema governance patterns like tenant, project, and agent scopes directly within the migration and data model definitions.

Why do I need versioned changesets for database schema changes?

Versioned changesets are needed for database schema changes to provide an auditable history of modifications, allowing you to review generated SQL and apply deployments safely across different project environments.

How do I update a database schema column without breaking existing data?

To update a database schema column without breaking existing data, use a guided migration workflow to generate the modification, review the SQL changeset, and validate the update with Zod schemas before applying it.