data-model-design

Design multi-tenant data models and manage migrations with UUID keys.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/comerito/om-hackathon-starter --skill data-model-design-comerito
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-model-design
Source: https://github.com/comerito/om-hackathon-starter/tree/main/.ai/skills/data-model-design
Command: npx skills add https://github.com/comerito/om-hackathon-starter --skill data-model-design-comerito

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Design entities, relationships, and manage the migration lifecycle following Open Mercato conventions to ensure scalable, multi-tenant data schemas.

Core Features & Use Cases

  • Design Workflow: identify distinct entities, clarify fields, map relationships, choose patterns, generate entity files, validators, and migrations, then verify outputs.
  • Entity Design & Standard Template: adopt the standard entity template with UUID primary keys, tenant-scoped identifiers, soft-delete columns, and audit timestamps.
  • Migration Lifecycle & Cross-Module References: manage the migration lifecycle with a clear process, while maintaining module boundaries and avoiding cross-module ORM relations.
  • Advanced Patterns: support polymorphic references, soft delete, audit/history tables, and JSONB for flexible metadata, while enforcing safe, documented practices.

Quick Start

Define your first entity using the standard template and generate a migration.

Frequently Asked Questions about data-model-design

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

FAQPage Schema
How do I design a data model for multi-tenant applications?

You can design multi-tenant entities by adopting a standard template featuring UUID primary keys, tenant-scoped identifiers, soft-delete columns, and audit timestamps to maintain structured and isolated database schemas.

What is the best way to manage database migrations across different modules?

Managing database migrations across modules requires following a structured migration lifecycle that maintains strict module boundaries and avoids cross-module ORM relations to prevent architectural coupling.

How do I handle flexible metadata and polymorphic references in entity design?

You can handle flexible metadata and polymorphic references in entity design by utilizing advanced patterns like JSONB columns for metadata storage and polymorphic relationships, enforcing safe and documented architectural practices.

What columns are required when planning entities for scalable schemas?

Required columns when planning entities for scalable schemas include UUID primary keys, tenant-scoped identifiers, soft-delete columns for safe removal, and audit timestamps for tracking historical changes.

Why should I avoid cross-module ORM relations during database design?

Avoiding cross-module ORM relations during database design maintains clear module boundaries, preventing tightly coupled architectures and simplifying the migration lifecycle across independent application modules.

Can I use soft delete and audit tables with UUID primary keys?

Yes, you can use soft delete and audit or history tables alongside UUID primary keys, as these advanced patterns are fully supported within the standard entity template to ensure data traceability and integrity.