database-migration
하는 일
이 도구는 데이터베이스 변경을 관리하도록 돕습니다. 데이터베이스 관리 시스템(ORM)을 바꾸는 경우나 서비스 중단 없이 업데이트해야 할 때도 데이터베이스 구조와 데이터를 안전하게 수정할 수 있게 합니다.
사용하는 경우
- ✓한 데이터베이스 시스템에서 다른 시스템으로 바꿔야 할 때.
- ✓데이터베이스 구조(테이블이나 열 추가, 삭제, 수정)를 업데이트할 때.
- ✓데이터베이스 사이에서 데이터를 옮기거나 변환할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/database-migration/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Sequelize에서 TypeORM으로 데이터베이스를 옮기려고 합니다. 데이터가 정확하게 전송되고 서비스가 중단되지 않도록 하려면 어떻게 해야 할까요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 데이터베이스를 변경하는 스크립트를 만드는 과정을 안내합니다. 또한 문제가 생기면 변경을 되돌리는 전략과, 서비스 중단 없이 업데이트하는 방법도 제공합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Supporting material availability
This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:
<support-root>/references/orm-switching.md<support-root>/references/schema-migration.md<support-root>/references/data-transformation.md<support-root>/references/rollback-strategies.md<support-root>/assets/schema-migration-template.sql<support-root>/assets/data-migration-script.py<support-root>/scripts/test-migration.sh
Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.
Database Migration
Master database schema and data migrations across ORMs (Sequelize, TypeORM, Prisma), including rollback strategies and zero-downtime deployments.
Do not use this skill when
- The task is unrelated to database migration
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
Use this skill when
- Migrating between different ORMs
- Performing schema transformations
- Moving data between databases
- Implementing rollback procedures
- Zero-downtime deployments
- Database version upgrades
- Data model refactoring
ORM Migrations
Sequelize Migrations
// migrations/20231201-create-users.js
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('users', {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
email: {
type: Sequelize.STRING,
unique: true,
allowNull: false
},
createdAt: Sequelize.DATE,
updatedAt: Sequelize.DATE
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable('users');
}
};
// Run: npx sequelize-cli db:migrate
// Rollback: npx sequelize-cli db:migrate:undo
TypeORM Migrations
// migrations/1701234567-CreateUsers.ts
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
export class CreateUsers1701234567 implements MigrationInterface {
public 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
},
{
name: 'created_at',
type: 'timestamp',
default: 'CURRENT_TIMESTAMP'
}
]
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable('users');
}
}
// Run: npm run typeorm migration:run
// Rollback: npm run typeorm migration:revert
Prisma Migrations
// schema.prisma
model User {
id Int @id @default(autoincrement())
email String @unique
createdAt DateTime @default(now())
}
// Generate migration: npx prisma migrate dev --name create_users
// Apply: npx prisma migrate deploy
Schema Transformations
Adding Columns with Defaults
// Safe migration: add column with default
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn('users', 'status', {
type: Sequelize.STRING,
defaultValue: 'active',
allowNull: false
});
},
down: async (queryInterface) => {
await queryInterface.removeColumn('users', 'status');
}
};
Renaming Columns (Zero Downtime)
// Step 1: Add new column
module.exports = {
up: async (queryInterface, Sequelize) => {
…
자주 묻는 질문
ORM이란 무엇인가요?
'Object-Relational Mapping'의 약자입니다. SQL 명령을 직접 쓰지 않고, 이미 알고 있는 프로그래밍 언어로 데이터베이스와 작업할 수 있게 해 주는 기술입니다.
'무중단 배포'란 무엇인가요?
사용자가 서비스를 이용하지 못하는 시간 없이 시스템이나 데이터베이스를 업데이트하는 전략입니다. 전환이 너무 매끄러워 아무도 눈치채지 못하는 것이 목표입니다.
'롤백'이란 무엇인가요?
이미 적용된 변경을 되돌리는 과정입니다. 데이터베이스 업데이트가 문제를 일으키면, 업데이트가 없었던 것처럼 이전 상태로 돌아갈 수 있습니다.
상세 정보
작성자의 원본 설명
Master database schema and data migrations across ORMs (Sequelize, TypeORM, Prisma), including rollback strategies and zero-downtime deployments.
인기도
- GitHub 스타
- 48k
- 순위
- #4332
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.