What problem does it solve?
Designing consistent relational database schemas across teams is error-prone: inconsistent naming, unsafe auto-increment primary keys, missing audit columns, and poorly planned indexes cause maintenance and migration pain. This Skill provides a complete set of database design conventions for the Nop platform so every table follows the same rules.
Core Features & Use Cases
- Naming Conventions: Enforces snake_case singular table names with module prefixes (e.g., nop_auth_user), column naming rules, and index naming patterns (pk_, uk_, ix_, fk_).
- Primary Key & Standard Fields: Mandates application-generated keys (UUID v7, snowflake, NanoID) instead of AUTO_INCREMENT, plus required audit fields (created_by, create_time, updated_by, update_time), optimistic locking (version), and logical deletion (del_flag).
- Ready-to-Use Templates: Provides standard business table, many-to-many relation table, and log table DDL templates, plus a cross-database type mapping for MySQL, PostgreSQL, Oracle, and SQLite.
- Use Case: When designing a new audit module, apply the conventions to produce nop_audit_client with proper primary key strategy, audit columns, indexes, and a migration script that passes the built-in design checklist.
Quick Start
Ask the AI to design a new database table for your module following the Nop database design conventions, including naming, primary key strategy, audit fields, and indexes.