Title: Database missing table
Last modified: May 28, 2023

---

# Database missing table

 *  [Mr-Manor](https://wordpress.org/support/users/mr-manor/)
 * (@mr-manor)
 * [3 years ago](https://wordpress.org/support/topic/database-missing-table/)
 * Hi
 * I have a quite old website and would like to preserve my statistics. But somewhere
   along the way, some tables seems to have gone lost or failed to get created. 
   So apache drops lines like this to the error_log:
 *     ```wp-block-code
       [Sun May 28 21:43:58.183893 2023] [php7:notice] [pid 2418] [client 185.125.223.32:0] WordPress database error Table 'wpbusene.wp_2_slim_events' doesn't exist for query \n\t\t\tINSERT IGNORE INTO wp_2_slim_events (position, id, dt, notes)\n\t\t\tVALUES ('717,407','68684','1685310238','{\\"id\\":\\"user_pass\\",\\"type\\":\\"mousedown\\",\\"button\\":\\"left\\"}') made by do_action('wp_ajax_nopriv_slimtrack'), WP_Hook->do_action, WP_Hook->apply_filters, wp_slimstat::sli>
       [Sun May 28 21:43:59.827274 2023] [php7:notice] [pid 2390] [client 185.125.223.32:0] WordPress database error Table 'wpbusene.wp_2_slim_events' doesn't exist for query \n\t\t\tINSERT IGNORE INTO wp_2_slim_events (position, id, dt, notes)\n\t\t\tVALUES ('812,446','68684','1685310239','{\\"value\\":\\"Log In\\",\\"id\\":\\"wp-submit\\",\\"type\\":\\"mousedown\\",\\"button\\":\\"left\\"}') made by do_action('wp_ajax_nopriv_slimtrack'), WP_Hook->do_action, WP_Hook->apply_>
       ```
   
 * Is there away to create the missing tables or recreate the database without loosing
   all collected statistics?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [toxicum](https://wordpress.org/support/users/toxicum/)
 * (@toxicum)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/database-missing-table/#post-16994975)
 * May it be of help for you, here is the table structure I have with latest version
   4.8.0. btw: “wp_2” seems to be your configured db-prefix.
   `CREATE TABLE wp_2_slim_events(
   event_id int(10) NOT NULL AUTO_INCREMENT,type tinyint(3) unsigned DEFAULT 0,event_description
   varchar(64) DEFAULT NULL,notes varchar(256) DEFAULT NULL,position varchar(32)
   DEFAULT NULL,id int(10) unsigned NOT NULL DEFAULT 0,dt int(10) unsigned DEFAULT
   0,PRIMARY KEY (event_id),KEY vansp_slim_stat_events_idx (dt),KEY fk_vansp_slim_events_id(
   id),CONSTRAINT fk_vansp_slim_events_id FOREIGN KEY (id) REFERENCES vansp_slim_stats(
   id) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB AUTO_INCREMENT=1003 DEFAULT
   CHARSET=utf8 COLLATE=utf8_general_ci;
    -  This reply was modified 2 years, 10 months ago by [toxicum](https://wordpress.org/support/users/toxicum/).
 *  Plugin Contributor [toxicum](https://wordpress.org/support/users/toxicum/)
 * (@toxicum)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/database-missing-table/#post-16995010)
 * So your Slimstat version must be very old, because this table was added with 
   version 4.3.7 more than 7 years ago. 
   See [https://github.com/wp-slimstat/wp-slimstat/blame/master/admin/index.php#L386](https://github.com/wp-slimstat/wp-slimstat/blame/master/admin/index.php#L386)
   This file also holds all other table definitions, so please check them as well.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Database missing table’ is closed to new replies.

 * ![](https://ps.w.org/wp-slimstat/assets/icon.svg?rev=2832242)
 * [SlimStat Analytics](https://wordpress.org/plugins/wp-slimstat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-slimstat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-slimstat/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-slimstat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-slimstat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-slimstat/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [missing table](https://wordpress.org/support/topic-tag/missing-table/)

 * 2 replies
 * 2 participants
 * Last reply from: [toxicum](https://wordpress.org/support/users/toxicum/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/database-missing-table/#post-16995010)
 * Status: not resolved