Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Automator_DB::verify_base_tables( false $execute = false )
Validates if all Automator tables exists
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $execute
(Optional)
Default value: false
Return Return
(array)
Source Source
File: src/core/class-automator-db.php
public static function verify_base_tables( $execute = false ) { require_once ABSPATH . 'wp-admin/includes/upgrade.php'; if ( $execute ) { self::create_tables(); self::create_views(); } $queries = dbDelta( self::get_schema(), false ); $missing_tables = array(); foreach ( $queries as $table_name => $result ) { if ( "Created table $table_name" === $result ) { $missing_tables[] = $table_name; } } if ( 0 < count( $missing_tables ) ) { update_option( 'automator_schema_missing_tables', $missing_tables ); } else { update_option( 'uap_database_version', AUTOMATOR_DATABASE_VERSION ); delete_option( 'automator_schema_missing_tables' ); delete_option( 'automator_schema_missing_views' ); } return $missing_tables; }
Expand full source code Collapse full source code View on Github
Changelog Changelog
Version | Description |
---|---|
3.0 | Introduced. |