From 893744795587d4e379b1776d02de6abd65cd5b64 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 27 Feb 2023 13:32:15 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E8=B5=84=E4=BA=A7=20?= =?UTF-8?q?address=20=E9=95=BF=E5=BA=A6=EF=BC=8C=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20mb4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit perf: 修改长度 --- apps/assets/migrations/0093_auto_20220403_1627.py | 2 +- apps/assets/models/asset/common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/migrations/0093_auto_20220403_1627.py b/apps/assets/migrations/0093_auto_20220403_1627.py index d28d8cfc0..c34c70ed7 100644 --- a/apps/assets/migrations/0093_auto_20220403_1627.py +++ b/apps/assets/migrations/0093_auto_20220403_1627.py @@ -93,7 +93,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='asset', name='address', - field=models.CharField(db_index=True, max_length=1024, verbose_name='Address'), + field=models.CharField(db_index=True, max_length=767, verbose_name='Address'), ), migrations.AddField( model_name='asset', diff --git a/apps/assets/models/asset/common.py b/apps/assets/models/asset/common.py index 54fa473bd..74df4a358 100644 --- a/apps/assets/models/asset/common.py +++ b/apps/assets/models/asset/common.py @@ -100,7 +100,7 @@ class Asset(NodesRelationMixin, AbsConnectivity, JMSOrgBaseModel): Type = const.AllTypes name = models.CharField(max_length=128, verbose_name=_('Name')) - address = models.CharField(max_length=1024, verbose_name=_('Address'), db_index=True) + address = models.CharField(max_length=767, verbose_name=_('Address'), db_index=True) platform = models.ForeignKey(Platform, on_delete=models.PROTECT, verbose_name=_("Platform"), related_name='assets') domain = models.ForeignKey("assets.Domain", null=True, blank=True, related_name='assets', verbose_name=_("Domain"), on_delete=models.SET_NULL)