From edc11966afe00a03ad6a8c40ba05cb80849135c9 Mon Sep 17 00:00:00 2001 From: "Mr. Senko" Date: Sat, 25 May 2019 21:44:50 +0300 Subject: [PATCH] [db] Make sender an EmailField this will accomodate the larger size --- .../migrations/0003_sender_email_field.py | 18 ++++++++++++++++++ tcms_github_marketplace/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tcms_github_marketplace/migrations/0003_sender_email_field.py diff --git a/tcms_github_marketplace/migrations/0003_sender_email_field.py b/tcms_github_marketplace/migrations/0003_sender_email_field.py new file mode 100644 index 0000000..7a45e46 --- /dev/null +++ b/tcms_github_marketplace/migrations/0003_sender_email_field.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.1 on 2019-05-25 18:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tcms_github_marketplace', '0002_update_fields'), + ] + + operations = [ + migrations.AlterField( + model_name='purchase', + name='sender', + field=models.EmailField(db_index=True, max_length=254), + ), + ] diff --git a/tcms_github_marketplace/models.py b/tcms_github_marketplace/models.py index 3524461..71132df 100644 --- a/tcms_github_marketplace/models.py +++ b/tcms_github_marketplace/models.py @@ -14,7 +14,7 @@ class Purchase(models.Model): """ vendor = models.CharField(max_length=16, db_index=True, blank=True, null=True) action = models.CharField(max_length=64, db_index=True) - sender = models.CharField(max_length=64, db_index=True) + sender = models.EmailField(db_index=True) effective_date = models.DateTimeField(db_index=True) # this is for internal purposes