fix: add version max length (#4713)

This commit is contained in:
Nikhil 2024-06-05 20:13:28 +05:30 committed by GitHub
parent 028e70c4c1
commit ca9f3f2f5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 49 additions and 6 deletions

View File

@ -0,0 +1,43 @@
# Generated by Django 4.2.11 on 2024-06-05 13:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("license", "0002_rename_version_instance_current_version_and_more"),
]
operations = [
migrations.AlterField(
model_name="changelog",
name="title",
field=models.CharField(max_length=255),
),
migrations.AlterField(
model_name="changelog",
name="version",
field=models.CharField(max_length=255),
),
migrations.AlterField(
model_name="instance",
name="current_version",
field=models.CharField(max_length=255),
),
migrations.AlterField(
model_name="instance",
name="latest_version",
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name="instance",
name="namespace",
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name="instance",
name="product",
field=models.CharField(default="plane-ce", max_length=255),
),
]

View File

@ -21,15 +21,15 @@ class Instance(BaseModel):
whitelist_emails = models.TextField(blank=True, null=True) whitelist_emails = models.TextField(blank=True, null=True)
instance_id = models.CharField(max_length=255, unique=True) instance_id = models.CharField(max_length=255, unique=True)
license_key = models.CharField(max_length=256, null=True, blank=True) license_key = models.CharField(max_length=256, null=True, blank=True)
current_version = models.CharField(max_length=10) current_version = models.CharField(max_length=255)
latest_version = models.CharField(max_length=10, null=True, blank=True) latest_version = models.CharField(max_length=255, null=True, blank=True)
product = models.CharField( product = models.CharField(
max_length=50, default=ProductTypes.PLANE_CE.value max_length=255, default=ProductTypes.PLANE_CE.value
) )
domain = models.TextField(blank=True) domain = models.TextField(blank=True)
# Instance specifics # Instance specifics
last_checked_at = models.DateTimeField() last_checked_at = models.DateTimeField()
namespace = models.CharField(max_length=50, blank=True, null=True) namespace = models.CharField(max_length=255, blank=True, null=True)
# telemetry and support # telemetry and support
is_telemetry_enabled = models.BooleanField(default=True) is_telemetry_enabled = models.BooleanField(default=True)
is_support_required = models.BooleanField(default=True) is_support_required = models.BooleanField(default=True)
@ -86,9 +86,9 @@ class InstanceConfiguration(BaseModel):
class ChangeLog(BaseModel): class ChangeLog(BaseModel):
"""Change Log model to store the release changelogs made in the application.""" """Change Log model to store the release changelogs made in the application."""
title = models.CharField(max_length=100) title = models.CharField(max_length=255)
description = models.TextField(blank=True) description = models.TextField(blank=True)
version = models.CharField(max_length=100) version = models.CharField(max_length=255)
tags = models.JSONField(default=list) tags = models.JSONField(default=list)
release_date = models.DateTimeField(null=True) release_date = models.DateTimeField(null=True)
is_release_candidate = models.BooleanField(default=False) is_release_candidate = models.BooleanField(default=False)