Skip to content

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.


  1. Log in to your WordPress Admin Dashboard.
  2. Navigate to AdFuz > Tools > Database Tools.
  3. Click on the Migrations tab at the top of the panel.

In the Database Migrations view:

  • Current Database Version: Displays the currently active schema version (e.g., 1.3.1).
  • Migration History Table: Displays all available migrations sorted latest version first (descending):
Column Example Description
VERSION 1.3.1 Plugin release version containing the schema patch
DESCRIPTION Create unified adfuz_jobs table for asynchronous background queue and polling 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

Version Description Target Table(s)
1.3.1 Create unified adfuz_jobs table for asynchronous background queue and polling wp_adfuz_jobs
1.2.9 Add hide_link_name column to ads and campaigns tables wp_adfuz_ads, wp_adfuz_campaigns

You should manually trigger a migration if:

  1. New features or options fail to save: e.g., enabling background queues or setting Hide Link Name results in a database error.
  2. “Unknown Column” or “Table doesn’t exist” SQL error appears in logs: Indicates a newly introduced table/column is missing from MySQL.
  3. 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”
  1. Navigate to AdFuz > Tools > Database Tools > Migrations.
  2. Locate the target version (e.g., 1.3.1).
  3. Click the Run button on the right side of the row.
  4. Wait for the confirmation notice. The status badge will change from Pending to Applied.
  5. Switch to the Tables tab to verify that the corresponding table row count and schema are green and healthy.