WordPress at Your Fingertips
function is not described

ActionScheduler_LoggerSchema::get_table_definition() protected WC 1.0

{} It's a method of the class: ActionScheduler_LoggerSchema{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_table_definition( $table );
$table (required)
-

Code of ActionScheduler_LoggerSchema::get_table_definition() WC 6.1.0

protected function get_table_definition( $table ) {
	global $wpdb;
	$table_name       = $wpdb->$table;
	$charset_collate  = $wpdb->get_charset_collate();
	switch ( $table ) {

		case self::LOG_TABLE:

			$default_date = ActionScheduler_StoreSchema::DEFAULT_DATE;
			return "CREATE TABLE {$table_name} (
			        log_id bigint(20) unsigned NOT NULL auto_increment,
			        action_id bigint(20) unsigned NOT NULL,
			        message text NOT NULL,
			        log_date_gmt datetime NULL default '${default_date}',
			        log_date_local datetime NULL default '${default_date}',
			        PRIMARY KEY  (log_id),
			        KEY action_id (action_id),
			        KEY log_date_gmt (log_date_gmt)
			        ) $charset_collate";

		default:
			return '';
	}
}