Class WPDA_Repository

Recreate repository objects.

author Peter Schulz
since 1.0.0
package WPDataAccess\Utilities

 Methods

__construct()

__construct() 

Create repository

create() 
since 1.0.0

Drop repository

drop() 
since 1.0.0

Inform user if repository is invalid

inform_user() 
since 1.0.0

Recreate repository (save as much data as possible)

recreate() 
since 2.0.11

Run SQL script file

run_script(string $sql_file, string $wpda_postfix = '') : mixed
since 2.0.11

Parameters

$sql_file

string

SQL script file name

$wpda_postfix

string

WPDA postfix

Returns

mixedResult of the query taken from the SQL script file

Cleanup plugin repository tables

cleanup() 

 Properties

 

$sql_repository_dir

$sql_repository_dir 

Default

''

 Constants

 

CREATE_TABLE

CREATE_TABLE = array('wpda_logging' => array('create_table_logging.sql'), 'wpda_menus' => array('create_table_menus.sql'), 'wpda_table_settings' => array('create_table_table_settings.sql'), 'wpda_table_design' => array('create_table_table_design.sql', 'create_table_table_design_alter1.sql', 'create_table_table_design_alter3.sql', 'create_table_table_design_alter3.sql'), 'wpda_publisher' => array('create_table_publisher.sql'), 'wpda_media' => array('create_table_media.sql'), 'wpda_project' => array('create_table_project.sql'), 'wpda_project_page' => array('create_table_project_page.sql'), 'wpda_project_table' => array('create_table_project_table.sql'), 'wpda_csv_uploads' => array('create_table_csv_uploads.sql')) 
 

DROP_TABLE

DROP_TABLE = array('wpda_logging' => array('drop_table_logging.sql'), 'wpda_menus' => array('drop_table_menus.sql'), 'wpda_table_settings' => array('drop_table_table_settings.sql'), 'wpda_table_design' => array('drop_table_table_design.sql'), 'wpda_publisher' => array('drop_table_publisher.sql'), 'wpda_media' => array('drop_table_media.sql'), 'wpda_project' => array('drop_table_project.sql'), 'wpda_project_page' => array('drop_table_project_page.sql'), 'wpda_project_table' => array('drop_table_project_table.sql'), 'wpda_csv_uploads' => array('drop_table_csv_uploads.sql'))