Use a migration runner with durable history for one-time, versioned changes, keep released migrations immutable, and design repeatable scripts to tolerate being applied again. These are two different kinds of “safe to rerun”: invoking the migration command again should skip completed work, while re-executing an individual script must be safe for the database’s current state.
What “safe to rerun” means
A migration command can be safe to invoke repeatedly without making every migration script repeatable. A runner checks its history, records completed migrations and applies only pending work. Separately, a script may need to run again after a partial failure or because it is configured as repeatable; in that case, the script’s operations must handle the existing schema and data correctly.
In Flyway, versioned migrations run in order and are applied once. Its schema history records applied migrations, checksums and success status, so the runner can distinguish completed work from pending changes. See Flyway’s migrations documentation for the distinction between versioned and repeatable migrations and how history is used.
Choose between a one-time and repeatable migration
Use a versioned migration for one-time work
Put a schema change or one-off data correction in a uniquely versioned migration. To answer the common question, “How do you add a migration script that should only run once?”: give it a new version and let the migration runner record its successful application. Calling the runner again should not execute that completed versioned migration again.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Once a versioned migration has been used in an environment, treat it as immutable. Its checksum helps detect edits, but a checksum is a warning mechanism, not permission to rewrite deployed history. If a released migration needs correction, add a new versioned migration that brings the database from its actual state to the intended state. Do not manually mark work complete unless you have verified the database and understand the effect on future deployments.
Use a repeatable migration for definitions meant to be refreshed
Repeatable migrations suit definitions such as views and procedures that should be recreated when their contents change. The runner uses a checksum to determine whether a repeatable migration needs to be applied again. Flyway’s documentation states: “It is your responsibility to ensure the same repeatable migration can be applied multiple times.” A common approach for database definitions is supported CREATE OR REPLACE syntax.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
For data changes that may be repeated, choose behavior for the target engine and the intended outcome: for example, a condition, a uniqueness constraint, or an upsert. A guard such as IF NOT EXISTS can avoid a duplicate-object error but still leave an object with the wrong definition. Verify the resulting schema and data instead of treating a suppressed error as proof of correctness.
Make retries safe without assuming rollback
Transactions can make a migration more atomic, but only if the database supports transactional execution for the statements involved. Flyway ordinarily wraps a migration in a transaction where supported. Some statements cannot run transactionally, and some databases implicitly commit around DDL; in those cases, a failed migration can leave changes behind. Flyway describes the possibility of manual cleanup and history repair after a failed non-transactional migration in its migration documentation.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Liquibase also warns that a multi-statement changeset configured not to run in a transaction can leave changelog state invalid if it fails partway through. Its runInTransaction reference, last updated January 21, 2026, explains the default transactional behavior and this failure risk. Neither tool’s transaction setting overrides the database’s statement-level capabilities.
Prepare a recovery path for non-transactional work
Before deploying a migration that cannot run transactionally, isolate the non-transactional step when the tool and database permit it. Document how to inspect whether it completed, what partial effects may remain, and how to clean up or finish the operation. Do this before production deployment, not while guessing after an error.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Use special care with PostgreSQL concurrent indexes
PostgreSQL’s CREATE INDEX CONCURRENTLY has special transaction and locking considerations. Flyway’s PostgreSQL database reference notes that Flyway’s default transactional lock can cause issues for this statement and documents an alternative session-level lock setting. Confirm the installed Flyway version and deployment configuration before using that setting.
What to do after a migration fails
A failed migration does not prove that nothing changed. If the statements ran transactionally and the database rolled them back, a retry may be appropriate after confirming the runner’s history. If the migration was non-transactional or rollback is uncertain, inspect both the actual schema and data state and the migration ledger before retrying.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
- Inspect the database. Determine which statements took effect and whether they left partial schema or data changes.
- Inspect migration history. Check whether the runner recorded the migration as failed, successful or otherwise inconsistent with the database.
- Reconcile the state. Clean up or complete partial effects using a procedure appropriate to the actual database state.
- Repair bookkeeping only when it is accurate. Use the migration tool’s repair mechanism only after the database and history have been reconciled; then apply the intended migration or a new correction as appropriate.
An undo script is not a general substitute for inspection. A multi-statement migration may fail after some statements have succeeded, leaving a state that an undo for the full migration does not address. Prefer backward-compatible schema changes during rollout and a tested backup-and-restore process over assuming an undo can reverse every partial execution. Flyway covers rollout compatibility and recovery practices in its rolling out updates guidance.
Prevent concurrent migration runs
Serialize migration execution: use one migration runner for a database change window or rely on the migration tool’s supported locking. Flyway describes a database-level lock on its schema history table so that only one concurrent migrations-based deployment proceeds at a time; see its deployment guidance.
Locking details still depend on the database and the code acquiring locks. PostgreSQL documents that under repeatable read, a transaction’s snapshot may predate a lock acquired after an earlier query. If application code uses explicit locks to coordinate concurrent changes, lock acquisition order matters; see PostgreSQL’s application-level consistency checks documentation.
Test the clean path, retry path and rollout
Exercise both command-level reruns and script-level retries. A useful test matrix includes:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute- A fresh database applying all migrations in order.
- A database already at the target version, where the runner should have no completed versioned work to repeat.
- A deliberate failure after an early statement, followed by inspection and a retry that reflects the database’s actual state.
- Two deployment processes attempting to migrate concurrently, to confirm that the supported lock or deployment procedure serializes them.
- A staged application rollout in which old and new application versions remain compatible with the intermediate database schema.
- A restore from backup, so recovery is based on a tested procedure rather than an assumed ability to undo partial DDL.
Before relying on a migration’s rollback or retry behavior, confirm the database version, migration-tool version and transactional support of the specific statements it contains. DDL behavior is not uniform across engines.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




