Skip to content
Agentmart
Submit a tool

db-migration

需要数据库迁移时使用 — 生成 migration 文件,含 up 和 down(回滚)

Skill by noobke

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/noobke-db-migration

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

需要数据库迁移时使用 — 生成 migration 文件,含 up 和 down(回滚)

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/db-migration

What's inside

Skill name
db-migration
Description
需要数据库迁移时使用 — 生成 migration 文件,含 up 和 down(回滚)
License
MIT
Instructions
44 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: missing

Files (1)

  • SKILL.md

SKILL.md (first lines)

# DB Migration — 数据库迁移

生成数据库迁移文件,含正向迁移和回滚脚本。

## 流程

1. **理解需求** — 用户描述的表/列变更
2. **检查现有 schema** — 读取现有 migration 文件或 schema 定义
3. **生成 migration** — up(正向)和 down(回滚)

## 支持的数据库

根据项目检测:
- PostgreSQL / MySQL / SQLite
- Prisma / Drizzle / Knex / 原生 SQL

## 输出格式

```sql
-- Up Migration
ALTER TABLE users ADD COLUMN last_login_at TIMESTAMP;

-- Down Migration
ALTER TABLE users DROP COLUMN last_login_at;
```

或 Prisma 格式:

```sql
-- AlterTable
ALTER TABLE "users" ADD COLUMN "last_login_at" TIMESTAMP;

-- 回滚
ALTER TABLE "users" DROP COLUMN "last_login_at";
```

## 规则

- 始终提供回滚(down)脚本
- migration 文件名带时间戳
- 涉及数据迁移时警告用户
- 使用事务(如数据库支持)

From noobke/reasonix-skills, MIT.

More from noobke/reasonix-skills

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
May 28, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from noobke

Cite this page

db-migration skill. Agent Mart. https://agentmart.dev/skills/noobke-db-migration (last updated 2026-10-24)