table-config

Configure database table field definitions in src/tables/{mod}/{mod}.ts for code generation.

14|5|Updated Jul 9, 2024
One-click install
npx skills add https://github.com/sail-sail/nest --skill table-config
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: table-config
Source: https://github.com/sail-sail/nest/tree/main/codegen/.github/skills/table-config
Command: npx skills add https://github.com/sail-sail/nest --skill table-config

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide standardizes the process of configuring table field definitions after creating database tables to streamline code generation.

Core Features & Use Cases

  • Guidelines for default field behaviors, auditing fields, and per-column options in src/tables/{mod}/{mod}.ts
  • Best practices for foreign keys, naming conventions, and inline relationship configuration during code generation
  • Real-world scenario: quickly aligning database schema with generated model code for scalable projects

Quick Start

Configure the table field mappings in src/tables/{mod}/{mod}.ts using the guidelines.

Frequently Asked Questions about table-config

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

FAQPage Schema
How do I configure database table fields for code generation in TypeScript?

To configure database table fields for code generation, define column options, auditing fields, and foreign key relationships in the src/tables/{mod}/{mod}.ts file to ensure consistent coding conventions across modular tables.

What is the best way to standardize default column options and auditing fields in generated code?

Standardizing default column options and auditing fields involves applying consistent structural guidelines to your TypeScript table definitions, ensuring default behaviors and explicit field options align across generated database models.

How do I define foreign key relationships and naming conventions for codegen table definitions?

Defining foreign key relationships and naming conventions requires configuring inline relationship settings within your TypeScript table definition files, guiding the code generator to accurately map schema relationships.

Can I use this table configuration approach to align database schema with generated model code?

Yes, this table configuration approach quickly aligns your database schema with generated model code by standardizing field mappings and structural conventions, supporting scalable project architecture.

When do I need to configure table field definitions in the src/tables directory?

You need to configure table field definitions after creating database tables and before running code generation, establishing the necessary structural mappings to streamline the generation of your data models.