Storage

Here you can edit the storage type of Logs, and in the future, more data types.

Currently there are two options available for storage,

  • yaml
  • mysql

Yaml

This storage type is faster because flatfiles are easy to query and modify. This type is recommended for small servers that do not rely fully on databases.

MySQL

This storage type is slower because databases are harder/slower to query and modify. This type is recommended for bigger servers.

If you are using MySQL, you NEED to create the tables yourself! Here is the create-statement:

CREATE TABLE `spacechat_logs` (
`senderName` MEDIUMTEXT NULL,
`senderUUID` VARCHAR(45) NULL,
`message` MEDIUMTEXT NULL,
`at` MEDIUMTEXT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`));

Fields

  • use
    • The storage type that will be used (options listed above)
  • mysql
    • These are all the options you will need to edit if connecting to a MySQL server
    • This also works with MariaDB (fully tested with both MySQL and MariaDB)
  • yaml
    • These are settings that you can change if needed, but it words fine without tweaking

Default Storage.yml

############################
# STORAGE CONFIGURATION #
# #
# Available Storage Types: #
# - mysql #
# - yaml #
############################
use: "yaml" # Which storage type to use
mysql: # MySQL config settings
address: ""
port: 3306
username: ""
password: ""
database: ""
tables:
logs: "spacechat_logs"
yaml:
tables:
logs: "logs"
hikari: # Hikari config (mariaDB / MySQL loader config)
maxPoolSize: 100
setIdleTimeout: 30000