From 955006f2185618f2ea517c0cc72e3523ab51b249 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 2 Sep 2023 16:22:48 -0700 Subject: [PATCH] Update Hosting Silvanus Yourself --- Hosting-Silvanus-Yourself.md | 75 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/Hosting-Silvanus-Yourself.md b/Hosting-Silvanus-Yourself.md index fc4a30e..0cb02d0 100644 --- a/Hosting-Silvanus-Yourself.md +++ b/Hosting-Silvanus-Yourself.md @@ -27,28 +27,6 @@ compare_channel_id | VARCHAR(50) | NOT NULL DEFAULT "Unknown" compare_message_id | VARCHAR(50) | NOT NULL DEFAULT "Unknown" * = PRIMARY KEY ``` -```plaintext -CREATE TABLE `guild_info` ( - `guild_id` varchar(50) NOT NULL, - `owner_id` varchar(50) NOT NULL DEFAULT 'Unknown', - `tree_name` varchar(100) NOT NULL DEFAULT 'Unknown', - `tree_height` float NOT NULL DEFAULT 0, - `tree_message_id` varchar(50) NOT NULL DEFAULT 'Unknown', - `tree_channel_id` varchar(50) NOT NULL DEFAULT 'Unknown', - `leaderboard_message_id` varchar(50) NOT NULL DEFAULT 'Unknown', - `leaderboard_channel_id` varchar(50) NOT NULL DEFAULT 'Unknown', - `water_message` varchar(1500) DEFAULT 'Not Set', - `water_role_id` varchar(50) DEFAULT 'Not Set', - `fruit_message` varchar(1500) DEFAULT 'Not Set', - `fruit_role_id` varchar(50) DEFAULT 'Not Set', - `reminder_channel_id` varchar(50) DEFAULT 'Not Set', - `watch_channel_id` varchar(50) DEFAULT 'Not Set', - `notifications_enabled` varchar(5) DEFAULT 'false', - `compare_channel_id` varchar(50) DEFAULT 'Unknown', - `compare_message_id` varchar(50) DEFAULT 'Unknown', - PRIMARY KEY (`guild_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -``` ### `leaderboard` ``` @@ -62,20 +40,6 @@ timestamp | DATETIME | | DEFAULT current_timestamp() * = PRIMARY KEY ``` - -```plaintext -CREATE TABLE `leaderboard` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `guild_id` varchar(50) NOT NULL, - `tree_name` varchar(100) NOT NULL, - `tree_rank` int(10) NOT NULL, - `tree_height` float NOT NULL DEFAULT 1, - `has_pin` tinyint(1) NOT NULL DEFAULT 0, - `timestamp` datetime DEFAULT current_timestamp(), - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=641074 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -``` - ## Baremetal Running Silvanus on bare metal is preferred for testing development versions, but you can run the production version on bare metal too if desired. @@ -161,4 +125,41 @@ Stop the container: ``` ### Logs -By default logs are stored in the `logs` folder where your `docker-compose.yml` file is. This can be changed by modifying the `volumes` entry in the Compose file. Unique logs are created on every startup, with a timestamp for a title. Silvanus does not implement any log rotation at the moment, so these may need to be periodically cleared out. Alternatively you could change how log files are generated in the `Dockerfile`. \ No newline at end of file +By default logs are stored in the `logs` folder where your `docker-compose.yml` file is. This can be changed by modifying the `volumes` entry in the Compose file. Unique logs are created on every startup, with a timestamp for a title. Silvanus does not implement any log rotation at the moment, so these may need to be periodically cleared out. Alternatively you could change how log files are generated in the `Dockerfile`. + +# Table creation syntax + +```plaintext +CREATE TABLE `guild_info` ( + `guild_id` varchar(50) NOT NULL, + `owner_id` varchar(50) NOT NULL DEFAULT 'Unknown', + `tree_name` varchar(100) NOT NULL DEFAULT 'Unknown', + `tree_height` float NOT NULL DEFAULT 0, + `tree_message_id` varchar(50) NOT NULL DEFAULT 'Unknown', + `tree_channel_id` varchar(50) NOT NULL DEFAULT 'Unknown', + `leaderboard_message_id` varchar(50) NOT NULL DEFAULT 'Unknown', + `leaderboard_channel_id` varchar(50) NOT NULL DEFAULT 'Unknown', + `water_message` varchar(1500) DEFAULT 'Not Set', + `water_role_id` varchar(50) DEFAULT 'Not Set', + `fruit_message` varchar(1500) DEFAULT 'Not Set', + `fruit_role_id` varchar(50) DEFAULT 'Not Set', + `reminder_channel_id` varchar(50) DEFAULT 'Not Set', + `watch_channel_id` varchar(50) DEFAULT 'Not Set', + `notifications_enabled` varchar(5) DEFAULT 'false', + `compare_channel_id` varchar(50) DEFAULT 'Unknown', + `compare_message_id` varchar(50) DEFAULT 'Unknown', + PRIMARY KEY (`guild_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +``` +```plaintext +CREATE TABLE `leaderboard` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `guild_id` varchar(50) NOT NULL, + `tree_name` varchar(100) NOT NULL, + `tree_rank` int(10) NOT NULL, + `tree_height` float NOT NULL DEFAULT 1, + `has_pin` tinyint(1) NOT NULL DEFAULT 0, + `timestamp` datetime DEFAULT current_timestamp(), + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=641074 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +``` \ No newline at end of file