Skip to content

Database Schema

Risto Lahtela edited this page Jun 9, 2019 · 23 revisions

Plan Header

Database Schema

Page Version: 4.6.0

Tables in Plan database

SHOW TABLES IN Plan;
+--------------------------+
| Tables_in_Plan           |
+--------------------------+
| plan_commandusages       |
| plan_ips                 |
| plan_kills               |
| plan_nicknames           |
| plan_ping                |
| plan_security            |
| plan_servers             |
| plan_sessions            |
| plan_settings            |
| plan_tps                 |
| plan_user_info           |
| plan_users               |
| plan_world_times         |
| plan_worlds              |
| plan_aac_hack_table      | // Only if AAC is installed as well.
| plan_version_protocol    | // Only if ViaVersion or ProtocolSupport is installed as well.
+--------------------------+

Some notes

plan_server:uuid: This uuid is ServerUUID, which the server generates the first time the server connects to the database. It uses server properties as the seed and can be found in ServerInfoFile.yml

Data types

SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, COLUMN_DEFAULT FROM information_schema.columns WHERE table_schema = 'Plan';
+--------------------+------------------+-----------+--------------------------+----------------+
| TABLE_NAME         | COLUMN_NAME      | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | COLUMN_DEFAULT |
+--------------------+------------------+-----------+--------------------------+----------------+
| plan_worlds        | id               | int       |                     NULL | NULL           |
| plan_worlds        | world_name       | varchar   |                      100 | NULL           |
| plan_worlds        | server_uuid      | varchar   |                       36 | NULL           |
| plan_sessions      | id               | int       |                     NULL | NULL           |
| plan_sessions      | uuid             | varchar   |                       36 | NULL           |
| plan_sessions      | server_uuid      | varchar   |                       36 | NULL           |
| plan_sessions      | session_start    | bigint    |                     NULL | NULL           |
| plan_sessions      | session_end      | bigint    |                     NULL | NULL           |
| plan_sessions      | mob_kills        | int       |                     NULL | NULL           |
| plan_sessions      | deaths           | int       |                     NULL | NULL           |
| plan_sessions      | afk_time         | bigint    |                     NULL | NULL           |
| plan_world_times   | id               | int       |                     NULL | NULL           |
| plan_world_times   | uuid             | varchar   |                       36 | NULL           |
| plan_world_times   | world_id         | int       |                     NULL | NULL           |
| plan_world_times   | server_uuid      | varchar   |                       36 | NULL           |
| plan_world_times   | session_id       | int       |                     NULL | NULL           |
| plan_world_times   | survival_time    | bigint    |                     NULL | 0              |
| plan_world_times   | creative_time    | bigint    |                     NULL | 0              |
| plan_world_times   | adventure_time   | bigint    |                     NULL | 0              |
| plan_world_times   | spectator_time   | bigint    |                     NULL | 0              |
| plan_ping          | id               | int       |                     NULL | NULL           |
| plan_ping          | uuid             | varchar   |                       36 | NULL           |
| plan_ping          | server_uuid      | varchar   |                       36 | NULL           |
| plan_ping          | date             | bigint    |                     NULL | NULL           |
| plan_ping          | max_ping         | int       |                     NULL | NULL           |
| plan_ping          | min_ping         | int       |                     NULL | NULL           |
| plan_ping          | avg_ping         | double    |                     NULL | NULL           |
| plan_kills         | id               | int       |                     NULL | NULL           |
| plan_kills         | killer_uuid      | varchar   |                       36 | NULL           |
| plan_kills         | victim_uuid      | varchar   |                       36 | NULL           |
| plan_kills         | server_uuid      | varchar   |                       36 | NULL           |
| plan_kills         | weapon           | varchar   |                       30 | NULL           |
| plan_kills         | date             | bigint    |                     NULL | NULL           |
| plan_kills         | session_id       | int       |                     NULL | NULL           |
| plan_nicknames     | id               | int       |                     NULL | NULL           |
| plan_nicknames     | uuid             | varchar   |                       36 | NULL           |
| plan_nicknames     | nickname         | varchar   |                       75 | NULL           |
| plan_nicknames     | server_uuid      | varchar   |                       36 | NULL           |
| plan_nicknames     | last_used        | bigint    |                     NULL | NULL           |
| plan_ips           | id               | int       |                     NULL | NULL           |
| plan_ips           | uuid             | varchar   |                       36 | NULL           |
| plan_ips           | ip               | varchar   |                       39 | NULL           |
| plan_ips           | geolocation      | varchar   |                       50 | NULL           |
| plan_ips           | ip_hash          | varchar   |                      200 | NULL           |
| plan_ips           | last_used        | bigint    |                     NULL | 0              |
| plan_commandusages | id               | int       |                     NULL | NULL           |
| plan_commandusages | command          | varchar   |                       20 | NULL           |
| plan_commandusages | times_used       | int       |                     NULL | NULL           |
| plan_commandusages | server_id        | int       |                     NULL | NULL           |
| plan_tps           | server_id        | int       |                     NULL | NULL           |
| plan_tps           | date             | bigint    |                     NULL | NULL           |
| plan_tps           | tps              | double    |                     NULL | NULL           |
| plan_tps           | players_online   | int       |                     NULL | NULL           |
| plan_tps           | cpu_usage        | double    |                     NULL | NULL           |
| plan_tps           | ram_usage        | bigint    |                     NULL | NULL           |
| plan_tps           | entities         | int       |                     NULL | NULL           |
| plan_tps           | chunks_loaded    | int       |                     NULL | NULL           |
| plan_tps           | free_disk_space  | bigint    |                     NULL | NULL           |
| plan_users         | id               | int       |                     NULL | NULL           |
| plan_users         | uuid             | varchar   |                       36 | NULL           |
| plan_users         | registered       | bigint    |                     NULL | NULL           |
| plan_users         | name             | varchar   |                       16 | NULL           |
| plan_users         | times_kicked     | int       |                     NULL | 0              |
| plan_security      | username         | varchar   |                      100 | NULL           |
| plan_security      | salted_pass_hash | varchar   |                      100 | NULL           |
| plan_security      | permission_level | int       |                     NULL | NULL           |
| plan_user_info     | id               | int       |                     NULL | NULL           |
| plan_user_info     | uuid             | varchar   |                       36 | NULL           |
| plan_user_info     | server_uuid      | varchar   |                       36 | NULL           |
| plan_user_info     | registered       | bigint    |                     NULL | NULL           |
| plan_user_info     | opped            | tinyint   |                     NULL | 0              |
| plan_user_info     | banned           | tinyint   |                     NULL | 0              |
| plan_settings      | id               | int       |                     NULL | NULL           |
| plan_settings      | server_uuid      | varchar   |                       39 | NULL           |
| plan_settings      | updated          | bigint    |                     NULL | NULL           |
| plan_settings      | content          | text      |                    65535 | NULL           |
| plan_servers       | id               | int       |                     NULL | NULL           |
| plan_servers       | uuid             | varchar   |                       36 | NULL           |
| plan_servers       | name             | varchar   |                      100 | NULL           |
| plan_servers       | web_address      | varchar   |                      100 | NULL           |
| plan_servers       | is_installed     | tinyint   |                     NULL | 1              |
| plan_servers       | max_players      | int       |                     NULL | -1             |
+--------------------+------------------+-----------+--------------------------+----------------+
Clone this wiki locally