From 4802ef490921f106d3a135da95c3d92c5736611b Mon Sep 17 00:00:00 2001 From: luolu-lg Date: Thu, 22 Sep 2022 15:23:43 +0800 Subject: [PATCH] Feature fix log length (#1300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 🐛 修复日志request_path长度 --- .../migrations/0007_alter_log_request_path.py | 18 ++++++++++++++++++ .../com_longgui_logging_mysql/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 extension_root/com_longgui_logging_mysql/migrations/0007_alter_log_request_path.py diff --git a/extension_root/com_longgui_logging_mysql/migrations/0007_alter_log_request_path.py b/extension_root/com_longgui_logging_mysql/migrations/0007_alter_log_request_path.py new file mode 100644 index 000000000..33f2ceaa4 --- /dev/null +++ b/extension_root/com_longgui_logging_mysql/migrations/0007_alter_log_request_path.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.6 on 2022-09-22 07:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('com_longgui_logging_mysql', '0006_log_request_path_log_status_code_log_username_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='log', + name='request_path', + field=models.CharField(db_index=True, max_length=760, null=True), + ), + ] diff --git a/extension_root/com_longgui_logging_mysql/models.py b/extension_root/com_longgui_logging_mysql/models.py index e9d1c115d..23fbb49d2 100644 --- a/extension_root/com_longgui_logging_mysql/models.py +++ b/extension_root/com_longgui_logging_mysql/models.py @@ -24,7 +24,7 @@ class Meta: data = models.JSONField(blank=True, default=dict, verbose_name='日志数据') created = models.DateTimeField(auto_now_add=True, blank=True, null=True, verbose_name='创建时间', db_index = True) username = models.CharField(max_length=128, blank=False, null=True, db_index = True) - request_path = models.CharField(max_length=128, blank=False, null=True, db_index = True) + request_path = models.CharField(max_length=760, blank=False, null=True, db_index = True) status_code = models.IntegerField(blank=False, null=True, db_index = True)