wp_aichat_sessions

Static

Stores session data for tracking user or visitor state.

Column Definitions

ColumnTypeNullable
🔑idBIGINT UNSIGNEDNO
session_keyVARCHAR(64)NO
user_idBIGINT UNSIGNEDYES
modeENUM('chat','assistant')NO
ip_hashVARCHAR(64)YES
user_agentVARCHAR(255)YES
created_atDATETIMENO
updated_atDATETIMENO
session_idBIGINT UNSIGNEDNO
roleENUM('user','assistant','system')NO
contentLONGTEXTNO
created_atDATETIMENO

CREATE TABLE Statement

CREATE TABLE wp_aichat_sessions ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, session_key VARCHAR(64) NOT NULL, user_id BIGINT UNSIGNED NULL, mode ENUM('chat','assistant') NOT NULL DEFAULT 'chat', ip_hash VARCHAR(64) NULL, user_agent VARCHAR(255) NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY session_key (session_key) ) $charset_collate;"; // Messages table. $sql_messages = "CREATE TABLE wp_aichat_messages ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, session_id BIGINT UNSIGNED NOT NULL, role ENUM('user','assistant','system') NOT NULL, content LONGTEXT NOT NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY session_id (session_id) ) $charset_collate;"; dbDelta( $sql_sessions );

Safe to delete?

If you have uninstalled Chatwick, this table is generally safe to remove. However, always back up your database first.

Note: Some plugins share tables or are dependencies of other plugins. Verify nothing else depends on this table before dropping it.

How to remove this table

DROP TABLE IF EXISTS `wp_aichat_sessions`;

Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.

Other tables from Chatwick