From 29a6779b2a6dc5bc5a705283fa0e4cffb280d323 Mon Sep 17 00:00:00 2001 From: jackra1n <45038833+jackra1n@users.noreply.github.com> Date: Thu, 22 Aug 2024 23:23:46 +0200 Subject: [PATCH] Adjust DB, adjust logger --- core/custom_logger.py | 2 +- resources/CreateDatabase.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/custom_logger.py b/core/custom_logger.py index 80654c8..c6d9292 100644 --- a/core/custom_logger.py +++ b/core/custom_logger.py @@ -21,7 +21,7 @@ class CustomLogFormatter(logging.Formatter): dt_fmt = "%Y-%m-%d %H:%M:%S" FORMATS = { - logging.DEBUG: format_prefix + dark_grey + level_name + format_suffix, + logging.DEBUG: format_prefix + purple + level_name + format_suffix, logging.INFO: format_prefix + dark_grey + level_name + format_suffix, logging.WARNING: format_prefix + yellow + level_name + source_line + format_suffix, logging.ERROR: format_prefix + red + level_name + source_line + format_suffix, diff --git a/resources/CreateDatabase.sql b/resources/CreateDatabase.sql index 31145ba..0088601 100644 --- a/resources/CreateDatabase.sql +++ b/resources/CreateDatabase.sql @@ -127,9 +127,9 @@ CREATE TABLE IF NOT EXISTS free_game_history ( ); CREATE TABLE IF NOT EXISTS url_cleaner_settings ( - id BIGINT PRIMARY KEY, + id SERIAL PRIMARY KEY, discord_server_id BIGINT REFERENCES discord_server(discord_server_id) ON DELETE CASCADE, - mode VARCHAR(20) NOT NULL CHECK (mode IN ('whitelist', 'blacklist')) + mode VARCHAR(20) NOT NULL DEFAULT 'whitelist' CHECK (mode IN ('whitelist', 'blacklist')) ); CREATE TABLE IF NOT EXISTS url_cleaner_channels (