How to Run Database Schema Migrations Manually
When you update the AdFuz plugin to a new release, database migrations run automatically to update table schemas, add new columns, create indexes, or transform existing data.
If a deployment or server timeout interrupts an automatic migration, you can manually trigger and verify migrations through the Database Migrations manager.
Accessing the Migrations Panel
Section titled “Accessing the Migrations Panel”- Log in to your WordPress Admin Dashboard.
- Navigate to AdFuz > Tools > Database Tools.
- Click on the Migrations tab at the top of the panel.
Migrations Interface & Controls
Section titled “Migrations Interface & Controls”In the Database Migrations view:
- Current Database Version: Displays the currently active schema version (e.g.,
1.2.9). - Migration History Table:
| Column | Example | Description |
|---|---|---|
| VERSION | 1.2.9 |
Plugin release version containing the schema patch |
| DESCRIPTION | Add hide_link_name column to ads and campaigns tables |
Summary of tables, columns, or indexes being modified |
| STATUS | Applied | Shows whether the migration executed successfully |
| ACTION | Blue Run Button | Triggers manual execution of the selected migration |
When Should You Run a Migration Manually?
Section titled “When Should You Run a Migration Manually?”You should manually trigger a migration if:
- New features or options fail to save: e.g., enabling
Hide Link Namein a campaign results in a database error or does not persist. - “Unknown Column” SQL error appears in logs: Indicates a newly introduced column is missing from
wp_adfuz_adsorwp_adfuz_campaigns. - Upgrading across multiple major versions: If skipping several versions at once, running each pending migration ensures zero schema drift.
Step-by-Step: Manually Executing a Migration
Section titled “Step-by-Step: Manually Executing a Migration”- Navigate to AdFuz > Tools > Database Tools > Migrations.
- Locate the target version (e.g.,
1.2.9). - Click the Run button on the right side of the row.
- Wait for the confirmation notice. The status badge will change from Pending to Applied.
- Switch to the Tables tab to verify that the corresponding table row count and schema are green and healthy.