perf: change ftplog asset length

This commit is contained in:
ibuler 2025-06-10 17:50:51 +08:00 committed by 老广
parent b3bfbf5046
commit 48a9b2664a
3 changed files with 19 additions and 3 deletions

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('audits', '0005_rename_serviceaccesslog'),
]
@ -18,7 +17,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='ftplog',
name='asset',
field=models.CharField(db_index=True, max_length=1024, verbose_name='Asset'),
field=models.CharField(db_index=True, max_length=767, verbose_name='Asset'),
),
migrations.AlterField(
model_name='ftplog',

View File

@ -0,0 +1,17 @@
# Generated by Django 4.1.13 on 2025-06-10 09:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("audits", "0006_alter_ftplog_account_alter_ftplog_asset_and_more"),
]
operations = [
migrations.AlterField(
model_name='ftplog',
name='asset',
field=models.CharField(db_index=True, max_length=768, verbose_name='Asset'),
),
]

View File

@ -56,7 +56,7 @@ class FTPLog(OrgModelMixin):
remote_addr = models.CharField(
max_length=128, verbose_name=_("Remote addr"), blank=True, null=True
)
asset = models.CharField(max_length=1024, verbose_name=_("Asset"), db_index=True)
asset = models.CharField(max_length=768, verbose_name=_("Asset"), db_index=True)
account = models.CharField(max_length=128, verbose_name=_("Account"), db_index=True)
operate = models.CharField(
max_length=16, verbose_name=_("Operate"), choices=OperateChoices.choices