Skip to content

Commit

Permalink
fix: convert CharFields to TextFields for FeatureImport / FeatureExpo…
Browse files Browse the repository at this point in the history
…rt models (#3720)
  • Loading branch information
matthewelwell committed Apr 4, 2024
1 parent b8d0736 commit 6bebcef
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 3.2.25 on 2024-04-04 17:07

from django.db import migrations, models

from features.import_export.constants import (
MAX_FEATURE_EXPORT_SIZE,
MAX_FEATURE_IMPORT_SIZE,
)


class Migration(migrations.Migration):

dependencies = [
("features_import_export", "0003_flagsmithonflagsmithfeatureexport"),
]

operations = [
migrations.AlterField(
model_name="featureexport",
name="data",
field=models.TextField(
blank=True, max_length=MAX_FEATURE_EXPORT_SIZE, null=True
),
),
migrations.AlterField(
model_name="featureimport",
name="data",
field=models.TextField(max_length=MAX_FEATURE_IMPORT_SIZE),
),
]
4 changes: 2 additions & 2 deletions api/features/import_export/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FeatureExport(models.Model):

# This is a JSON string of data used for file download
# once the task has completed assembly. It is null on upload.
data = models.CharField(
data = models.TextField(
max_length=MAX_FEATURE_EXPORT_SIZE,
blank=True,
null=True,
Expand Down Expand Up @@ -74,7 +74,7 @@ class FeatureImport(models.Model):
)

# This is a JSON string of data generated by the export.
data = models.CharField(max_length=MAX_FEATURE_IMPORT_SIZE)
data = models.TextField(max_length=MAX_FEATURE_IMPORT_SIZE)
created_at = models.DateTimeField(auto_now_add=True)


Expand Down

0 comments on commit 6bebcef

Please sign in to comment.