# mainwp/6.2.2/includes/core-db-schema-info.php

MainWP Dashboard: Self-hosted WordPress Management for Agencies, version 6.2.2. 384 lines.

- Page: https://pluginprobe.com/plugins/mainwp/6.2.2/code/includes/core-db-schema-info.php
- Raw: https://pluginprobe.com/plugins/mainwp/6.2.2/raw/includes/core-db-schema-info.php
- Modified: 2026-09-09T15:30:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/mainwp/6.2.2/code/includes/core-db-schema-info.php#L10-L20`.

```php
<?php
/**
 * MainWP Core database schema information used to detect database issues.
 *
 * This file was initially generated by external code and tools.
 *
 * Table names are defined without the default prefix (`$wpdb->prefix . 'mainwp_'`). The prefix is added after loading for processing.
 *
 * @package     MainWP/Dashboard
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}


return array(
    'wp_clients'              => array(
        'columns' => array(
            'client_id'          => 'int(11) NOT NULL auto_increment',
            'image'              => "varchar(255) NOT NULL default ''",
            'name'               => 'varchar(255) NOT NULL',
            'address_1'          => "varchar(255) NOT NULL default ''",
            'address_2'          => "varchar(255) NOT NULL default ''",
            'city'               => "varchar(100) NOT NULL default ''",
            'zip'                => "varchar(32) NOT NULL default ''",
            'state'              => "varchar(200) NOT NULL default ''",
            'country'            => "varchar(200) NOT NULL default ''",
            'note'               => "longtext NOT NULL default ''",
            'selected_icon_info' => "varchar(64) NOT NULL default ''",
            'client_email'       => 'varchar(191) NOT NULL',
            'client_phone'       => "varchar(100) NOT NULL default ''",
            'client_facebook'    => "varchar(255) NOT NULL default ''",
            'client_twitter'     => "varchar(255) NOT NULL default ''",
            'client_instagram'   => "varchar(255) NOT NULL default ''",
            'client_linkedin'    => "varchar(255) NOT NULL default ''",
            'created'            => 'int(11) NOT NULL DEFAULT 0',
            'suspended'          => 'tinyint(1) NOT NULL DEFAULT 0',
            'primary_contact_id' => 'int(11) NOT NULL default 0',
        ),
    ),

    'wp_clients_fields'       => array(
        'columns' => array(
            'field_id'   => 'int(11) NOT NULL auto_increment',
            'field_name' => 'varchar(191) NOT NULL DEFAULT ""',
            'field_desc' => 'varchar(255) NOT NULL DEFAULT ""',
            'client_id'  => 'int(11) NOT NULL',
        ),
    ),

    'wp_clients_field_values' => array(
        'columns' => array(
            'value_id'        => 'int(11) NOT NULL auto_increment',
            'field_id'        => 'int(11) NOT NULL',
            'field_value'     => 'longtext NOT NULL DEFAULT ""',
            'value_client_id' => 'int(11) NOT NULL',
        ),
    ),

    'wp_clients_contacts'     => array(
        'columns' => array(
            'contact_id'        => 'int(11) NOT NULL auto_increment',
            'contact_client_id' => 'int(11) NOT NULL',
            'contact_email'     => 'varchar(191) NOT NULL',
            'contact_image'     => 'varchar(255) NOT NULL default ""',
            'contact_icon_info' => 'varchar(64) NOT NULL default ""',
            'contact_name'      => 'varchar(255) NOT NULL',
            'contact_phone'     => 'varchar(100) NOT NULL default ""',
            'contact_role'      => 'varchar(255) NOT NULL default ""',
            'facebook'          => 'varchar(255) NOT NULL default ""',
            'twitter'           => 'varchar(255) NOT NULL default ""',
            'instagram'         => 'varchar(255) NOT NULL default ""',
            'linkedin'          => 'varchar(255) NOT NULL default ""',
        ),
    ),
    'monitors'                => array(
        'columns' => array(
            'monitor_id'                     => 'int(11) NOT NULL auto_increment',
            'wpid'                           => 'int(11) NOT NULL',
            'active'                         => 'tinyint(1) DEFAULT -1',
            'type'                           => "varchar(20) NOT NULL DEFAULT ''",
            'keyword'                        => "varchar(255) NOT NULL DEFAULT ''",
            'suburl'                         => "varchar(255) NOT NULL DEFAULT ''",
            'issub'                          => 'tinyint(1) DEFAULT 0',
            'timeout'                        => 'smallint NOT NULL DEFAULT -1',
            'interval'                       => 'int(11) NOT NULL DEFAULT -1',
            'retry_interval'                 => 'int(11) NOT NULL DEFAULT 1',
            'up_status_codes'                => "text NOT NULL DEFAULT ''",
            'last_status'                    => 'tinyint(1) DEFAULT 99',
            'last_main_status'               => 'tinyint(1) DEFAULT 99',
            'last_http_code'                 => 'int(11) NOT NULL DEFAULT 0',
            'lasttime_check'                 => 'int(11) NOT NULL',
            'retries'                        => 'tinyint(1) DEFAULT 0',
            'maxretries'                     => 'tinyint(1) DEFAULT -1',
            'maxredirects'                   => 'tinyint(1) DEFAULT 2',
            'method'                         => "varchar(20) NOT NULL DEFAULT ''",
            'dts_interval_lasttime'          => 'int(11) NOT NULL DEFAULT 0',
            'dts_auto_monitoring_time'       => 'int(11) NOT NULL DEFAULT 0',
            'dts_auto_monitoring_start'      => 'int(11) NOT NULL DEFAULT 0',
            'dts_auto_monitoring_retry_time' => 'int(11) NOT NULL DEFAULT 0',
        ),
    ),

    'monitor_heartbeat'       => array(
        'columns' => array(
            'heartbeat_id' => 'int(11) NOT NULL auto_increment',
            'monitor_id'   => 'int(11) NOT NULL',
            'msg'          => 'text NOT NULL',
            'importance'   => 'tinyint(1) NOT NULL DEFAULT 0',
            'status'       => 'smallint NOT NULL DEFAULT 3',
            'time'         => 'DATETIME NOT NULL',
            'ping_ms'      => 'int DEFAULT 0',
            'duration'     => 'int DEFAULT 0',
            'down_count'   => 'tinyint(1) NOT NULL DEFAULT 0',
            'http_code'    => 'smallint NOT NULL DEFAULT 0',
        ),
    ),

    'monitor_stat_hourly'     => array(
        'columns' => array(
            'stat_hourly_id' => 'int(11) NOT NULL auto_increment',
            'monitor_id'     => 'int(11) NOT NULL',
            'up'             => 'int DEFAULT 0',
            'down'           => 'int DEFAULT 0',
            'ping_avg'       => 'int DEFAULT 0',
            'ping_min'       => 'int DEFAULT 0',
            'ping_max'       => 'int DEFAULT 0',
            'timestamp'      => 'int DEFAULT 0',
        ),
    ),

    'wp'                      => array(
        'columns' => array(
            'id'                             => 'int(11) NOT NULL auto_increment',
            'userid'                         => 'int(11) NOT NULL',
            'adminname'                      => 'text NOT NULL',
            'name'                           => 'text NOT NULL',
            'url'                            => 'text NOT NULL',
            'pubkey'                         => 'text NOT NULL',
            'privkey'                        => 'text NOT NULL',
            'siteurl'                        => 'text NOT NULL',
            'ga_id'                          => 'text NOT NULL',
            'gas_id'                         => 'int(11) NOT NULL',
            'offline_checks_last'            => 'int(11) NOT NULL',
            'offline_check_result'           => 'int(11) NOT NULL',
            'http_response_code'             => 'int(11) NOT NULL DEFAULT 0',
            'http_code_noticed'              => 'tinyint(1) NOT NULL DEFAULT 1',
            'disable_health_check'           => 'tinyint(1) NOT NULL DEFAULT 0',
            'health_threshold'               => 'int(11) NOT NULL DEFAULT 0',
            'note'                           => 'text NOT NULL',
            'statsUpdate'                    => 'int(11) NOT NULL',
            'directories'                    => 'longtext NOT NULL',
            'plugin_upgrades'                => 'longtext NOT NULL',
            'theme_upgrades'                 => 'longtext NOT NULL',
            'translation_upgrades'           => 'longtext NOT NULL',
            'premium_upgrades'               => 'longtext NOT NULL',
            'securityIssues'                 => 'longtext NOT NULL',
            'themes'                         => 'longtext NOT NULL',
            'ignored_themes'                 => 'longtext NOT NULL',
            'plugins'                        => 'longtext NOT NULL',
            'ignored_plugins'                => 'longtext NOT NULL',
            'users'                          => 'longtext NOT NULL',
            'categories'                     => 'longtext NOT NULL',
            'pluginDir'                      => 'text NOT NULL',
            'automatic_update'               => 'tinyint(1) NOT NULL',
            'backup_before_upgrade'          => 'tinyint(1) NOT NULL DEFAULT 2',
            'mainwpdir'                      => 'tinyint(1) NOT NULL',
            'loadFilesBeforeZip'             => 'tinyint(1) NOT NULL DEFAULT 1',
            'is_ignoreCoreUpdates'           => 'tinyint(1) NOT NULL DEFAULT 0',
            'is_ignorePluginUpdates'         => 'tinyint(1) NOT NULL DEFAULT 0',
            'is_ignoreThemeUpdates'          => 'tinyint(1) NOT NULL DEFAULT 0',
            'verify_certificate'             => 'tinyint(1) NOT NULL DEFAULT 1',
            'force_use_ipv4'                 => 'tinyint(1) NOT NULL DEFAULT 0',
            'ssl_version'                    => 'tinyint(1) NOT NULL DEFAULT 0',
            'ip'                             => "text NOT NULL DEFAULT ''",
            'uniqueId'                       => 'text NOT NULL',
            'maximumFileDescriptorsOverride' => 'tinyint(1) NOT NULL DEFAULT 0',
            'maximumFileDescriptorsAuto'     => 'tinyint(1) NOT NULL DEFAULT 1',
            'maximumFileDescriptors'         => 'int(11) NOT NULL DEFAULT 150',
            'primary_backup_method'          => "varchar(64) NOT NULL DEFAULT ''",
            'http_user'                      => "text NOT NULL DEFAULT ''",
            'http_pass'                      => "text NOT NULL DEFAULT ''",
            'wpe'                            => 'tinyint(1) NOT NULL',
            'is_staging'                     => 'tinyint(1) NOT NULL DEFAULT 0',
            'client_id'                      => 'int(11) NOT NULL DEFAULT 0',
            'suspended'                      => 'tinyint(1) NOT NULL DEFAULT 0',
        ),
    ),

    'wp_sync'                 => array(
        'columns' => array(
            'sync_id'               => 'int(11) NOT NULL auto_increment',
            'wpid'                  => 'int(11) NOT NULL',
            'version'               => "text NOT NULL DEFAULT ''",
            'sync_errors'           => "longtext NOT NULL DEFAULT ''",
            'uptodate'              => "longtext NOT NULL DEFAULT ''",
            'dtsAutomaticSync'      => 'int(11) NOT NULL DEFAULT 0',
            'dtsAutomaticSyncStart' => 'int(11) NOT NULL DEFAULT 0',
            'dtsSync'               => 'int(11) NOT NULL DEFAULT 0',
            'dtsSyncStart'          => 'int(11) NOT NULL DEFAULT 0',
            'totalsize'             => 'int(11) NOT NULL DEFAULT 0',
            'dbsize'                => 'int(11) NOT NULL DEFAULT 0',
            'extauth'               => "text NOT NULL DEFAULT ''",
            'last_post_gmt'         => 'int(11) NOT NULL DEFAULT 0',
            'health_value'          => 'int(11) NOT NULL DEFAULT 0',
            'health_status'         => 'tinyint(1) NOT NULL DEFAULT 0',
            'health_site_noticed'   => 'tinyint(1) NOT NULL DEFAULT 1',
        ),
    ),

    'wp_options'              => array(
        'columns' => array(
            'opt_id' => 'int(11) NOT NULL auto_increment',
            'wpid'   => 'int(11) NOT NULL',
            'name'   => "text NOT NULL DEFAULT ''",
            'value'  => "longtext NOT NULL DEFAULT ''",
        ),
    ),

    'users'                   => array(
        'columns' => array(
            'userid'                => 'int(11) NOT NULL',
            'user_email'            => "text NOT NULL DEFAULT ''",
            'ignored_plugins'       => "longtext NOT NULL DEFAULT ''",
            'trusted_plugins'       => "longtext NOT NULL DEFAULT ''",
            'trusted_plugins_notes' => "longtext NOT NULL DEFAULT ''",
            'ignored_themes'        => "longtext NOT NULL DEFAULT ''",
            'ignored_wp_upgrades'   => "longtext NOT NULL DEFAULT ''",
            'trusted_themes'        => "longtext NOT NULL DEFAULT ''",
            'trusted_themes_notes'  => "longtext NOT NULL DEFAULT ''",
            'site_view'             => "tinyint(1) NOT NULL DEFAULT '0'",
            'pluginDir'             => "text NOT NULL DEFAULT ''",
            'dismissed_plugins'     => "longtext NOT NULL DEFAULT ''",
            'dismissed_themes'      => "longtext NOT NULL DEFAULT ''",
        ),
    ),

    'wp_status'               => array(
        'columns' => array(
            'statusid'        => 'bigint(20) unsigned NOT NULL auto_increment',
            'wpid'            => 'int(11) NOT NULL',
            'http_code'       => 'smallint NOT NULL DEFAULT 0',
            'status'          => 'tinyint(1) NOT NULL DEFAULT 0',
            'event_timestamp' => 'int(11) NOT NULL',
            'duration'        => 'int(11) NOT NULL DEFAULT 0',
        ),
    ),

    'group'                   => array(
        'columns' => array(
            'id'     => 'int(11) NOT NULL auto_increment',
            'userid' => 'int(11) NOT NULL',
            'name'   => 'text NOT NULL',
            'color'  => 'varchar(32) NOT NULL DEFAULT ""',
        ),
    ),

    'wp_group'                => array(
        'columns' => array(
            'wp_group_id' => 'int(11) NOT NULL auto_increment',
            'wpid'        => 'int(11) NOT NULL',
            'groupid'     => 'int(11) NOT NULL',
        ),
    ),

    'lookup_item_objects'     => array(
        'columns' => array(
            'lookup_id'   => 'bigint(20) unsigned NOT NULL auto_increment',
            'item_id'     => 'bigint(20) unsigned NOT NULL',
            'item_name'   => 'varchar(32) NOT NULL',
            'object_id'   => 'bigint(20) unsigned NOT NULL',
            'object_name' => 'varchar(32) NOT NULL',
        ),
    ),


    'api_keys'                => array(
        'columns' => array(
            'key_id'          => 'bigint(20) unsigned NOT NULL auto_increment',
            'user_id'         => 'bigint(20) unsigned NOT NULL',
            'description'     => 'varchar(200) NULL',
            'permissions'     => 'varchar(10) NOT NULL',
            'consumer_key'    => 'char(64) NOT NULL',
            'consumer_secret' => 'varchar(255) NOT NULL',
            'nonces'          => 'longtext NULL',
            'truncated_key'   => 'char(7) NOT NULL',
            'key_pass'        => 'char(64) NOT NULL DEFAULT ""',
            'key_type'        => 'tinyint(1) NOT NULL DEFAULT 0',
            'enabled'         => 'tinyint(1) DEFAULT 0',
            'last_access'     => 'datetime NULL default null',
        ),
    ),

    'action_log'              => array(
        'columns' => array(
            'id'            => 'int(11) NOT NULL auto_increment',
            'log_content'   => "mediumtext NOT NULL DEFAULT ''",
            'log_type'      => 'tinyint(1) DEFAULT 0',
            'log_color'     => 'tinyint(1) DEFAULT 0',
            'log_user'      => "varchar(128) NOT NULL DEFAULT ''",
            'log_timestamp' => 'int(11) NOT NULL DEFAULT 0',
        ),
    ),

    'request_log'             => array(
        'columns' => array(
            'id'                    => 'int(11) NOT NULL auto_increment',
            'wpid'                  => 'int(11) NOT NULL',
            'ip'                    => "text NOT NULL DEFAULT ''",
            'subnet'                => "text NOT NULL DEFAULT ''",
            'micro_timestamp_stop'  => 'DECIMAL( 12, 2 ) NOT NULL DEFAULT 0',
            'micro_timestamp_start' => 'DECIMAL( 12, 2 ) NOT NULL DEFAULT 0',
        ),
    ),

    'schedule_processes'      => array(
        'columns' => array(
            'process_id'            => 'int(11) NOT NULL auto_increment',
            'item_id'               => 'int(11) NOT NULL',
            'type'                  => 'varchar(32) NOT NULL',
            'process_slug'          => 'varchar(64) NOT NULL',
            'status'                => "varchar(32) NOT NULL DEFAULT ''",
            'dts_process_start'     => 'int(11) NOT NULL DEFAULT 0',
            'dts_process_init_time' => 'int(11) NOT NULL DEFAULT 0',
            'dts_process_stop'      => 'int(11) NOT NULL DEFAULT 0',
        ),
    ),

    'cost_tracker'            => array(
        'columns' => array(
            'id'                 => 'int(11) NOT NULL AUTO_INCREMENT',
            'name'               => 'text NOT NULL',
            'url'                => 'text NOT NULL',
            'type'               => 'varchar(20) NOT NULL',
            'product_type'       => 'varchar(20) NOT NULL',
            'slug'               => 'varchar(191) NOT NULL DEFAULT ""',
            'license_type'       => 'varchar(20) NOT NULL',
            'cost_status'        => 'varchar(20) NOT NULL',
            'payment_method'     => 'varchar(50) NOT NULL',
            'price'              => 'decimal(26,8) NOT NULL',
            'renewal_type'       => 'varchar(20) NOT NULL',
            'last_renewal'       => 'int(11) NOT NULL',
            'next_renewal'       => 'int(11) NOT NULL',
            'next_renewal_today' => 'int(11) NOT NULL',
            'last_alert'         => 'int(11) NOT NULL',
            'cost_icon'          => 'varchar(64) NOT NULL DEFAULT ""',
            'cost_color'         => 'varchar(64) NOT NULL DEFAULT ""',
            'sites'              => 'text NOT NULL',
            'groups'             => 'text NOT NULL',
            'clients'            => 'text NOT NULL',
            'note'               => 'text NOT NULL',
        ),
    ),

    'wp_logs'                 => array(
        'columns' => array(
            'log_id'      => 'bigint(20) NOT NULL auto_increment',
            'site_id'     => 'bigint(20) unsigned NULL',
            'log_type_id' => 'bigint NOT NULL DEFAULT 0',
            'item'        => "varchar(256) NOT NULL DEFAULT ''",
            'user_id'     => "int(11) unsigned NOT NULL DEFAULT '0'",
            'user_login'  => 'varchar(100) NOT NULL',
            'action'      => 'varchar(100) NOT NULL',
            'context'     => 'varchar(100) NOT NULL',
            'connector'   => 'varchar(100) NOT NULL',
            'state'       => 'tinyint(1) unsigned NULL',
            'created'     => 'BIGINT(20) UNSIGNED NOT NULL',
            'duration'    => "float(11,4) NOT NULL DEFAULT '0'",
            'dismiss'     => 'tinyint(1) NOT NULL DEFAULT 0',
        ),
    ),

    'wp_logs_meta'            => array(
        'columns' => array(
            'meta_id'     => 'bigint(20) unsigned NOT NULL AUTO_INCREMENT',
            'meta_log_id' => 'bigint(20) unsigned NOT NULL',
            'meta_key'    => 'varchar(200) NOT NULL',
            'meta_value'  => 'mediumtext NOT NULL',
        ),
    ),
);

```
