database-migration-generator
Database Migration Generator Skill
データベースマイグレーションスクリプトを生成するスキルです。
主な機能
- テーブル作成: CREATE TABLE
- カラム追加/削除: ALTER TABLE
- インデックス: CREATE INDEX
- 外部キー: FOREIGN KEY制約
- ロールバック: DOWN migration
生成例
-- migrations/001_create_users.up.sql
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) NOT NULL UNIQUE,
name VARCHAR(100) NOT NULL,
password_hash VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_users_email ON users(email);
-- migrations/001_create_users.down.sql
DROP TABLE IF EXISTS users;
TypeORM (TypeScript)
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
export class CreateUsers1234567890 implements MigrationInterface {
async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(new Table({
name: 'users',
columns: [
{
name: 'id',
type: 'int',
isPrimary: true,
isGenerated: true,
generationStrategy: 'increment'
},
{
name: 'email',
type: 'varchar',
isUnique: true
}
]
}));
}
async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable('users');
}
}
バージョン情報
- Version: 1.0.0
More from ntaksh42/agents
document-summarizer
Summarize long documents with key points and abstracts. Use when creating executive summaries or condensing content.
138pptx-generator
Generate PowerPoint presentations with slides, charts, and formatting. Use when creating presentations programmatically.
94document-formatter
Format and style documents with consistent formatting. Use when standardizing document formatting or cleaning up text.
48excel-processor
Process Excel files with data manipulation, formula generation, and chart creation. Use when working with spreadsheets or Excel data.
39presentation-creator
Marpを使用した提案資料・比較検討資料の作成スキル。課題提示、複数案の比較検討、メリット・デメリット整理を含む資料を作成する。使用場面:(1) 技術選定や方式比較の検討資料、(2) 提案書・企画書、(3) 問題解決策の提示、(4) 意思決定を支援するドキュメント。作成完了後は必ずサブエージェントでレビューを実施する。
29pdf-processor
Process, extract, and generate PDF documents with text extraction and form handling. Use when working with PDF files or extracting PDF content.
22