Database Tables (6 tables)
wp_of_reactions
sqlid BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY
reply_id BIGINT UNSIGNED NOT NULL
user_id BIGINT UNSIGNED NOT NULL
emoji VARCHAR(10)
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
UNIQUE KEY unique_reaction (reply_id, user_id, emoji)
INDEX idx_reply_id (reply_id)
wp_of_subscriptions
sqlid BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY
user_id BIGINT UNSIGNED NOT NULL
object_type ENUM('thread','room')
object_id BIGINT UNSIGNED NOT NULL
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
UNIQUE KEY unique_sub (user_id, object_type, object_id)
wp_of_notifications
sqlid BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY
user_id BIGINT UNSIGNED NOT NULL
type VARCHAR(40) -- reply, mention, reaction
source_id BIGINT UNSIGNED -- reply or thread ID
is_read TINYINT(1) DEFAULT 0
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
INDEX idx_user_unread (user_id, is_read)
wp_of_trust_levels
sqluser_id BIGINT UNSIGNED PRIMARY KEY
level TINYINT UNSIGNED DEFAULT 0
post_count INT UNSIGNED DEFAULT 0
last_calc DATETIME
wp_of_ip_bans
sqlid BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY
ip_address VARCHAR(45) UNIQUE
banned_by BIGINT UNSIGNED
reason VARCHAR(255)
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
wp_of_moderation_log
sqlid BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY
action VARCHAR(50)
object_type VARCHAR(30)
object_id BIGINT UNSIGNED
actor_id BIGINT UNSIGNED
note TEXT
created_at DATETIME DEFAULT CURRENT_TIMESTAMP