wp_dgd_race_tracker_race_sessions
StaticStores session data for tracking user or visitor state.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| 🔑id | bigint(20) | NO |
| race_name | varchar(255) | NO |
| start_time | datetime | YES |
| end_time | datetime | YES |
| planned_end_time | datetime | YES |
| first_lap_extra_time | decimal(10, 2) | NO |
| target_offset_time | decimal(10, 2) | NO |
| rotation_sequence | longtext | YES |
| total_laps | int(11) | YES |
| notes | longtext | YES |
| created_at | datetime | YES |
| race_id | bigint(20) | NO |
| driver_order | int(11) | NO |
| driver_name | varchar(255) | NO |
| avg_lap_time | decimal(10, 2) | YES |
| total_laps | int(11) | YES |
| total_time | decimal(15, 2) | YES |
| created_at | datetime | YES |
| driver_id | bigint(20) | NO |
| race_id | bigint(20) | NO |
| lap_number | int(11) | NO |
| lap_time | decimal(10, 2) | NO |
| recorded_at | datetime | YES |
| race_id | bigint(20) | NO |
| from_driver_id | bigint(20) | NO |
| to_driver_id | bigint(20) | NO |
| switched_at | datetime | YES |
CREATE TABLE Statement
CREATE TABLE IF NOT EXISTS wp_dgd_race_tracker_race_sessions ( id bigint(20) NOT NULL AUTO_INCREMENT, race_name varchar(255) NOT NULL, start_time datetime DEFAULT CURRENT_TIMESTAMP, end_time datetime NULL, planned_end_time datetime NULL, first_lap_extra_time decimal(10, 2) NOT NULL DEFAULT 0 COMMENT 'in seconds', target_offset_time decimal(10, 2) NOT NULL DEFAULT 0 COMMENT 'in seconds', rotation_sequence longtext NULL, total_laps int(11) DEFAULT 0, notes longtext NULL, created_at datetime DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ) $charset_collate;"; // Drivers table $sql_drivers = "CREATE TABLE IF NOT EXISTS wp_dgd_race_tracker_drivers ( id bigint(20) NOT NULL AUTO_INCREMENT, race_id bigint(20) NOT NULL, driver_order int(11) NOT NULL DEFAULT 0, driver_name varchar(255) NOT NULL, avg_lap_time decimal(10, 2) NULL COMMENT 'in seconds', total_laps int(11) DEFAULT 0, total_time decimal(15, 2) DEFAULT 0 COMMENT 'in seconds', created_at datetime DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY race_id (race_id) ) $charset_collate;"; // Lap Times table $sql_laps = "CREATE TABLE IF NOT EXISTS wp_dgd_race_tracker_lap_times ( id bigint(20) NOT NULL AUTO_INCREMENT, driver_id bigint(20) NOT NULL, race_id bigint(20) NOT NULL, lap_number int(11) NOT NULL, lap_time decimal(10, 2) NOT NULL COMMENT 'in seconds', recorded_at datetime DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY driver_id (driver_id), KEY race_id (race_id), KEY lap_number (lap_number) ) $charset_collate;"; // Driver Rotations table $sql_rotations = "CREATE TABLE IF NOT EXISTS wp_dgd_race_tracker_driver_rotations ( id bigint(20) NOT NULL AUTO_INCREMENT, race_id bigint(20) NOT NULL, from_driver_id bigint(20) NOT NULL, to_driver_id bigint(20) NOT NULL, switched_at datetime DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY race_id (race_id), KEY from_driver_id (from_driver_id), KEY to_driver_id (to_driver_id) ) $charset_collate;"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $sql_races );
Safe to delete?
If you have uninstalled DGD Race Tracker, 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_dgd_race_tracker_race_sessions`;
Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.
Other tables from DGD Race Tracker