From 9f66387e343760d17629920e2985c91843363d1a Mon Sep 17 00:00:00 2001 From: Sanjay B Date: Sat, 23 Oct 2021 16:24:40 +0530 Subject: [PATCH] add null=True to vimeo_id field so db allows NULLable, add migration --- .../migrations/0004_alter_film_vimeo_id.py | 18 ++++++++++++++++++ app/video/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 app/video/migrations/0004_alter_film_vimeo_id.py diff --git a/app/video/migrations/0004_alter_film_vimeo_id.py b/app/video/migrations/0004_alter_film_vimeo_id.py new file mode 100644 index 0000000..4a31b00 --- /dev/null +++ b/app/video/migrations/0004_alter_film_vimeo_id.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.7 on 2021-10-23 09:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('video', '0003_film_position'), + ] + + operations = [ + migrations.AlterField( + model_name='film', + name='vimeo_id', + field=models.CharField(blank=True, null=True, default=None, max_length=255), + ), + ] diff --git a/app/video/models.py b/app/video/models.py index 644deac..eb14b58 100644 --- a/app/video/models.py +++ b/app/video/models.py @@ -21,7 +21,7 @@ class Film(models.Model): position = models.IntegerField(default=0) padma_id = models.CharField(max_length=255) - vimeo_id = models.CharField(max_length=255, default=None, blank=True) + vimeo_id = models.CharField(max_length=255, default=None, blank=True, null=True) data = models.JSONField(default=dict, blank=True)