shadcn.io is not affiliated with official shadcn/ui
Schema Migrations Dashboard Block for Radix UI
A migration ledger with tabs for the last three batches, a table of each batch's migrations and states, an Apply next button that advances it, a log, a retry for the failed one and a roll back with confirmation.
Installation
Overview
Run a database migration batch one step at a time, with this schema migrations panel for React with Radix UI. A hairline frame with a plus mark on each corner opens with Tabs for three batches, each saying how many migrations are applied and how many are left to run. Each batch is a table of six migrations with the version, the name, an operation badge (CREATE, ALTER or INDEX), the time and a state: applied, pending, failed or rolled back. A failed migration has a Retry and a disclosure with its typed error, and blocks Apply next until you retry it. Under the table a log shows the newest line first, and a Shine Button applies the next migration. Roll back batch asks first in an Alert Dialog. It's built from Tabs, Collapsible, Alert Dialog, Badge and Guides. For database consoles and release tooling.
FAQ
How do I fill it with my own migrations?
Edit the three row lists: each migration has a batch, a version, a name, an operation, a duration in tenths of a second, a state and an error text for a failed one. The tab counts, the summary sentence and the log are worked out from the rows and FIRST_LOG.
What does Apply next do?
It sets the next pending (or rolled back) migration of the open batch to applied, adds a line to that batch's log and says so in the foot. If the batch has a failed migration it refuses and names it, because a runner must not skip a failure. With nothing left it says so.
What does rolling back do?
After you confirm, the batch's applied migrations are marked rolled back and Apply next can run them again, in order. Pending migrations stay pending. The button is off when nothing is applied.