# db-migrate

Run database migrations in Medusa

Skill by Medusa. Category: Data and backend.

## Install

Project (for this project only):

```sh
npx skills add medusajs/medusa-agent-skills --skill db-migrate
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add medusajs/medusa-agent-skills --skill db-migrate -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.
- Runs shell commands: Its steps run shell commands in your terminal.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass
- Runlayer: Warn
- ZeroLeaks: Pass

Installs: 3230. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/medusajs/medusa-agent-skills/db-migrate)

## Source

[Open the source](https://github.com/medusajs/medusa-agent-skills/tree/HEAD/plugins/medusa-dev/skills/db-migrate). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: db-migrate
description: Run database migrations in Medusa
allowed-tools: Bash(npx medusa db:migrate:*)
---

# Run Database Migrations

Execute the Medusa database migration command to apply pending migrations.

Use the Bash tool to execute: `npx medusa db:migrate`

Report the migration results to the user, including:

- Number of migrations applied
- Any errors that occurred
- Success confirmation
````

- Previous: [building-storefronts](https://syn4pse.dev/terminal/medusa-building-storefronts.md)
- Next: [learning-medusa](https://syn4pse.dev/terminal/medusa-learning.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
