# Application Developer Tool: Migrations Panel

A database migrations timeline with a header and apply action above a railed list of pending migrations and applied ones with run times.

- Page: https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/migrations-panel
- Collection: [Application](https://www.shadcn-ui-blocks.com/blocks/application-pro), Standard tier
- Group: [Developer Tools](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools)
- Created: 2026-07-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/migrations-panel.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/application-pro-developer-tools-migrations-panel
```

Needs an API key from a Pro or Team plan: add `@shadcn-ui-blocks` to the registries in components.json with the key as an `Authorization: Bearer` header. Setup: https://www.shadcn-ui-blocks.com/docs/shadcn-cli. The MCP server installs it without the setup: https://www.shadcn-ui-blocks.com/docs/mcp.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: badge, button
- Installs to: `@/components/blocks/application-pro/developer-tools/migrations-panel`

## About this block

Migrations Panel is the schema history surface for the
primary Postgres database, split into a pending queue and
an applied timeline on a shared rail. The header pairs a
production chip with an Apply 2 pending button. Two
pending migrations lead the list, each a dashed marker
with a filename, a pending badge, a Preview SQL action,
and a summary: one adds covering indexes for the invoice
list and export queries, the other backfills total_cents
on older invoices. Beneath them, four applied migrations
render as compact rows with a filled check, the applied
timestamp, a duration from 38 ms to 1.2 s, and the actor,
either deploy bot or a named engineer.

Pending and applied migrations are separate typed const
arrays, and the connecting rail is an absolutely
positioned span drawn behind each marker. The final
applied row omits the rail so the timeline closes cleanly.

## When to use

Reach for this block on a database or developer tools
page, wired to your migration runner. Keep the pending
list ordered and let the Apply button run the batch in a
single transaction, so a failure halfway through rolls
the whole set back rather than leaving the schema split.

A natural flow around it on an Application Pro page:

**Before**

- [Deploy panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools)
- [App shell](https://www.shadcn-ui-blocks.com/blocks/application-pro/app-shells)

**After**

- [Status and health](https://www.shadcn-ui-blocks.com/blocks/application-pro/status-health)
- [Log viewer](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools)

## What you can display

One strong use is the pending and applied schema view.
Other migration shapes:

- **Rollback view.** Add a revert action per applied row
  and show the down migration it would run.
- **Multi environment.** Add a column for staging and
  production so drift between them is obvious.
- **Failed run.** Surface a stopped migration with the
  error and the statement that broke the batch.

> Tip: state that the batch runs in one transaction; it
> is what lets an engineer apply pending work without
> fear of a half migrated schema.

## More in Application Developer Tools

- [Api Console](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/api-console)
- [Build Status List](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/build-status-list)
- [Cron Jobs Monitor](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/cron-jobs-monitor)
- [Dependency Audit](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/dependency-audit)
- [Deploy Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/deploy-panel)
- [Diff Viewer](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/diff-viewer)
- [Env Vars Manager](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/env-vars-manager)
- [Error Inbox](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/error-inbox)
- [Feature Flags Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/feature-flags-panel)
- [Log Viewer](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/log-viewer)
- [SDK Quickstart](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/sdk-quickstart)
- [Secrets Rotation Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/secrets-rotation-card)
- [SQL Query Editor](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/sql-query-editor)
- [Terminal Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/terminal-panel)
- [Trace Waterfall](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/trace-waterfall)
- [Webhook Logs Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/developer-tools/webhook-logs-table)
