From 87316f265ad759f738826ba011338f95ba6a570c Mon Sep 17 00:00:00 2001 From: sunxinpeng Date: Thu, 17 Aug 2023 16:46:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=B8=BB=E6=9C=BA=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=8F=8F=E8=BF=B0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A1=AB=E5=86=99=E5=8F=88=E6=B8=85=E7=A9=BA=EF=BC=8C=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E4=BF=A1=E6=81=AF=E5=8F=98=E4=B8=BA=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E9=A1=B9=20=E6=96=B0=E5=BB=BA=E9=9B=86=E7=BE=A4=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=A4=87=E6=B3=A8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A1=AB=E5=86=99=E5=8F=88=E6=B8=85=E7=A9=BA=EF=BC=8C=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E4=BF=A1=E6=81=AF=E5=8F=98=E4=B8=BA=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunxinpeng --- .../migrations/0005_auto_20230817_1644.py | 23 +++++++++++++++++++ sysom_server/sysom_api/apps/host/models.py | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 sysom_server/sysom_api/apps/host/migrations/0005_auto_20230817_1644.py diff --git a/sysom_server/sysom_api/apps/host/migrations/0005_auto_20230817_1644.py b/sysom_server/sysom_api/apps/host/migrations/0005_auto_20230817_1644.py new file mode 100644 index 00000000..243012a3 --- /dev/null +++ b/sysom_server/sysom_api/apps/host/migrations/0005_auto_20230817_1644.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.16 on 2023-08-17 08:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('host', '0004_auto_20221227_1705'), + ] + + operations = [ + migrations.AlterField( + model_name='cluster', + name='cluster_description', + field=models.CharField(blank=True, default='', max_length=255, null=True), + ), + migrations.AlterField( + model_name='hostmodel', + name='description', + field=models.CharField(blank=True, max_length=255, null=True), + ), + ] diff --git a/sysom_server/sysom_api/apps/host/models.py b/sysom_server/sysom_api/apps/host/models.py index 61f09f63..b89b4186 100644 --- a/sysom_server/sysom_api/apps/host/models.py +++ b/sysom_server/sysom_api/apps/host/models.py @@ -16,7 +16,7 @@ class HostModel(BaseModel): port = models.IntegerField(validators=[validators.MaxValueValidator(65535), validators.MinValueValidator(0)]) username = models.CharField(max_length=100) private_key = models.TextField(null=True) - description = models.CharField(max_length=255, null=True) + description = models.CharField(max_length=255, null=True, blank=True) status = models.IntegerField(choices=HOST_STATUS_CHOICES, default=2, verbose_name="主机状态") host_info = models.TextField(verbose_name='主机信息', default="") client_deploy_cmd = models.TextField(verbose_name="client部署命令", default="") @@ -33,7 +33,7 @@ class HostModel(BaseModel): class Cluster(BaseModel): cluster_name = models.CharField(max_length=128, unique=True) - cluster_description = models.CharField(max_length=255, default="") + cluster_description = models.CharField(max_length=255, default="", null=True, blank=True) class Meta: db_table = "sys_cluster" -- Gitee