wp_zestatix_element

Static

Stores zestatix element data created by this plugin.

Column Definitions

ColumnTypeNullable
🔑idINT( 10 )NO
selectorVARCHAR( 255 )NO
browser_widthVARCHAR( 100 )NO
createdTIMESTAMPNO
trackedINT( 1 )NO
user_idINT( 10 )NO
url_idSMALLINTNO
deviceVARCHAR( 6 )NO
widthVARCHAR( 15 )NO
eventTIMESTAMPNO
🔑FOREIGNKEYNO
urlTEXTNO
userINT( 10 )NO
urlSMALLINTNO
🔑FOREIGNKEYNO
ipVARCHAR( 40 )NO
locationVARCHAR( 50 )YES
loginVARCHAR( 50 )YES
urlTEXTNO
subdirINT( 1 )NO
FOREIGNKEYYES

CREATE TABLE Statement

CREATE TABLE IF NOT EXISTS wp_zestatix_element ( id INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY, selector VARCHAR( 255 ) NOT NULL UNIQUE, browser_width VARCHAR( 100 ) NOT NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, tracked INT( 1 ) NOT NULL ) {$charset_collate}"; $create_tables[] = "CREATE TABLE IF NOT EXISTS wp_zestatix_event ( selector_id INT( 10 ) NOT NULL, user_id INT( 10 ) NOT NULL, url_id SMALLINT NOT NULL, device VARCHAR( 6 ) NOT NULL, width VARCHAR( 15 ) NOT NULL, event TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY ( selector_id ) REFERENCES wp_zestatix_element ( id ) ON DELETE CASCADE ) {$charset_collate}"; $create_tables[] = "CREATE TABLE IF NOT EXISTS wp_zestatix_url ( id INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY, url TEXT NOT NULL ) {$charset_collate}"; $create_tables[] = "CREATE TABLE IF NOT EXISTS wp_zestatix_loaded ( elem INT( 10 ) NOT NULL, user INT( 10 ) NOT NULL, url SMALLINT NOT NULL, FOREIGN KEY ( elem ) REFERENCES wp_zestatix_element ( id ) ON DELETE CASCADE ) {$charset_collate}"; $create_tables[] = "CREATE TABLE IF NOT EXISTS wp_zestatix_user ( id INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY, ip VARCHAR( 40 ) NOT NULL, location VARCHAR( 50 ) NULL, login VARCHAR( 50 ) NULL, INDEX( ip ), INDEX( login ) ) {$charset_collate}"; $create_tables[] = "CREATE TABLE IF NOT EXISTS wp_zestatix_url_tracking ( id INT( 10 ) NOT NULL, url TEXT NOT NULL, subdir INT( 1 ) NOT NULL, FOREIGN KEY ( id ) REFERENCES wp_zestatix_element ( id ) ON DELETE CASCADE ) {$charset_collate}"; foreach ( $create_tables as $table ) { $wpdb->query( $table );

Safe to delete?

If you have uninstalled zeStatix, 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_zestatix_element`;

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

Other tables from zeStatix