HEX
Server: LiteSpeed
System: Linux cde4.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dmhkjfau (1027)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dmhkjfau/public_html/wp-content/plugins/kadence-blocks-pro/tables/KbpFormEventsIndex.php
<?php
/**
 * Form Events
 *
 * @package Kadence Blocks Pro
 */

//phpcs:disable Squiz.Commenting.VariableComment.MissingVar, Squiz.NamingConventions.ValidVariableName.StringNotCamelCaps

namespace KadenceWP\KadenceBlocksPro\Tables;

use KadenceWP\KadenceBlocksPro\StellarWP\Schema\Tables\Contracts\Table;

/**
 * Form Events Class
 */
class KbpFormEventsIndex extends Table {
	/**
	 * {@inheritdoc}
	 */
	const SCHEMA_VERSION = '1.0.0';

	/**
	 * {@inheritdoc}
	 */
	protected static $base_table_name = 'kbp_form_events';

	/**
	 * {@inheritdoc}
	 */
	protected static $group = 'kbp';

	/**
	 * {@inheritdoc}
	 */
	protected static $schema_slug = 'kbp-form-events';

	/**
	 * {@inheritdoc}
	 */
	protected static $uid_column = 'id';

	/**
	 * {@inheritdoc}
	 */
	protected function get_definition() {
		global $wpdb;
		$table_name      = self::table_name( true );
		$charset_collate = $wpdb->get_charset_collate();

		return "
			CREATE TABLE `{$table_name}` (
				`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
				`event_type` varchar(128) NOT NULL DEFAULT '',
				`event_post` int(11) NOT NULL DEFAULT '0',
				`event_time` datetime NOT NULL,
				`event_count` int(11) unsigned NOT NULL DEFAULT '1',
				`event_consolidated` tinyint(1) NOT NULL DEFAULT '0',
				PRIMARY KEY (`id`),
				UNIQUE KEY `event_type__post__time__consolidated` (event_type,event_post,event_time,event_consolidated)
			) {$charset_collate};
		";
	}
}