Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Schema Migrated Success Block for React

A confirmation panel for three database migrations: figures worked out from the ledger, an accordion of the migrations with their SQL as plus and minus lines, and a Roll back button that asks in an alert dialog before it changes the ledger.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show what a migration changed with this confirmation panel for React with Base UI. It is the panel Schemaloom, database tooling, shows after three migrations ran: a header with one action, the Shine Button that opens the diff, over one framed card in three bands. The first is three figures on shared hairlines (migrations, time, rows touched). The second is the ledger, an Accordion with one migration open at a time, each opening onto its statements as plus and minus lines in monospace. The foot has a live line, a Roll back button that asks in an Alert Dialog first and an Apply again button that undoes it. For database tooling, schema changes and any change you may have to undo.

FAQ

What stays in the page, and how do I wire it for real?

Nothing ran and nothing is rolled back. The three migrations, their times and rows are typed sample data, and the rollback only changes the ledger on the page. To wire it, fill MIGRATIONS from your migration table (id, name, the statements as added or removed lines, milliseconds and rows) and run the rollback in confirm; the figures, the sentence and every count are worked out from the migrations that are applied.

How does the ledger behave?

One migration is open at a time and one is always open, so the panel keeps its height (every panel has the same minimum height and holds up to three statements). Tab moves between the migration rows; the arrow keys do not. The open migration shows when it ran, how long it took and how many rows it touched, then its statements.

How are the statements shown?

Each line starts with a plus (added) or a minus (removed) as a character, never a colour, and is read out as Added or Removed. The box scrolls sideways when a statement is long and takes focus with the keyboard, and it stays left to right in a right-to-left page.

What does Roll back 0043 do?

It opens an alert dialog that says what the rollback would drop (the locale column and its values) and keeps 0041 and 0042. Cancel comes first and has the focus; Escape also closes it. The action is red because the values would be lost. Confirming marks 0043 as Rolled back and takes it out of the figures (2 of 3 applied); Apply 0043 again, beside it, then puts it back at once, and while it is rolled back Roll back stays in place and answers in words if pressed. Nothing is changed in any database.

Which numbers are worked out?

The count of applied migrations, the total time (5.1 s from 38 ms, 112 ms and 4.9 s) and the rows touched (16,286), all summed from the ledger and recomputed when a migration is rolled back.

  • Pro

    Database Restored Success

    Backups and exports

    A confirmation panel for a point-in-time restore: the restore point on a 24-hour strip with a range that previews other points, the snapshot and log it is made of, the writes it leaves out, and the connection string with a copy button.

  • Pro

    Storage Optimized Success

    Servers and storage

    A confirmation panel for a compaction: three cells on shared hairlines, one table each, with the size before as a hollow bar, the size after solid and the reclaimed part hatched, worked out from typed sizes, and a toggle group that sorts the tables.

  • Pro

    Backup Restored Success

    Backups and exports

    A confirmation page for a restore from a snapshot: the snapshot and the live database side by side with the same five tables, their row counts and checksums, a Match worked out for every pair, the checksum of the whole snapshot with a copy button and a local health check.

  • Pro

    A confirmation page for a finished maintenance window: planned against actual on one time axis from 02:00 to 05:00, the early finish worked out, and four services that each pick a tick on the axis and say when they came back.

  • Pro

    Instance Provisioned Success

    Servers and storage

    A confirmation window for a new server: a list of its facts beside three connect tabs (SSH, SFTP and Docker context) with copyable commands, and the 48 seconds it took as four steps on a time axis.

  • Pro

    Build Passed Success

    Builds and deploys

    A confirmation window for a green build: a bar of four stages as wide as their share of the run, a typed terminal log for the chosen stage with a once-only replay, a small artifacts table and a local Deploy this build.