Db table

From jujunjun110/product-starter · View interactive version

Db table is an AI agent skill from the GitHub repository jujunjun110/product-starter. データベースにテーブルを追加・変更する。Prismaスキーマ変更 + マイグレーション + Repository生成

How to use this skill

Skill file

DB テーブル追加・変更スキル

ユーザーが「〇〇テーブルを追加して」「〇〇カラムを追加して」と指示したときに適用する。

手順

1. Prisma スキーマ変更

apps/webapp/prisma/schema.prisma を編集:

2. マイグレーション作成

pnpm db:migrate

マイグレーション名の入力を求められたら、変更内容を簡潔に英語で入力する(例: add_jokes_table)。

3. Repository 生成

4. Domain Model 生成

src/backend/domain/models/{name}.model.ts:

ルール

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.