fix(findings): change uid from varchar to text (#7048)

This commit is contained in:
Pepe Fagoaga
2025-02-26 21:17:16 +05:45
committed by GitHub
parent 00ef037e45
commit 26014a9705
4 changed files with 20 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ All notable changes to the **Prowler API** are documented in this file.
### Changed
- Optimized `GET /findings` endpoint to improve response time and size [(#7019)](https://github.com/prowler-cloud/prowler/pull/7019).
- Changed `findings.uid` field type from `varchar(300)` to `text` [(#7048)](https://github.com/prowler-cloud/prowler/pull/7048).
---

View File

@@ -0,0 +1,17 @@
# Generated by Django 5.1.5 on 2025-02-26 13:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("api", "0011_findings_performance_indexes_parent"),
]
operations = [
migrations.AlterField(
model_name="finding",
name="uid",
field=models.TextField(blank=False, null=False),
),
]

View File

@@ -636,7 +636,7 @@ class Finding(PostgresPartitionedModel, RowLevelSecurityProtectedModel):
updated_at = models.DateTimeField(auto_now=True, editable=False)
first_seen_at = models.DateTimeField(editable=False, null=True)
uid = models.CharField(max_length=300)
uid = models.TextField(blank=False, null=False)
delta = FindingDeltaEnumField(
choices=DeltaChoices.choices,
blank=True,

View File

@@ -5834,7 +5834,7 @@ components:
properties:
uid:
type: string
maxLength: 300
nullable: false
delta:
enum:
- new
@@ -5893,7 +5893,6 @@ components:
readOnly: true
nullable: true
required:
- uid
- status
- severity
- check_id