*/ if ( ! defined( 'ABSPATH' ) ) { exit; } class Group107_AccessibleDocs_Activator { /** * Activate the plugin. * * Creates or updates the database table for storing AccessibleDocs data using dbDelta(). * This method sets up the required table structure with the necessary columns and indices. * * @since 1.0.0 * @global wpdb $wpdb WordPress database abstraction object. */ public static function activate() { global $wpdb; $table_name = $wpdb->prefix . 'accessible_docs'; // Table name $charset_collate = $wpdb->get_charset_collate(); $sql = "CREATE TABLE $table_name ( id mediumint(9) NOT NULL AUTO_INCREMENT, email varchar(255) NOT NULL, date datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, file_id bigint(20) UNSIGNED NOT NULL, accessible_docs_file_id varchar(255) NULL, accessible_docs_status varchar(255) NOT NULL, PRIMARY KEY (id) ) $charset_collate;"; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); } }