Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: convert CharFields to TextFields for FeatureImport / FeatureExport models #3720

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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