From 3fb2cfe47474e5b8953dcbe243b6361a89c1b66c Mon Sep 17 00:00:00 2001 From: Happy Felix Chukwuma Date: Thu, 22 Aug 2024 00:30:12 +0100 Subject: [PATCH] chore(fix): Update article schema for max charfield --- ...ter_article_summary_alter_article_title.py | 23 +++++++++++++++ ...le_summary_alter_article_title_and_more.py | 28 +++++++++++++++++++ ...le_summary_alter_article_title_and_more.py | 28 +++++++++++++++++++ server/apps/research/models/article.py | 4 +-- 4 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 server/apps/research/migrations/0010_alter_article_summary_alter_article_title.py create mode 100644 server/apps/research/migrations/0011_alter_article_summary_alter_article_title_and_more.py create mode 100644 server/apps/research/migrations/0012_alter_article_summary_alter_article_title_and_more.py diff --git a/server/apps/research/migrations/0010_alter_article_summary_alter_article_title.py b/server/apps/research/migrations/0010_alter_article_summary_alter_article_title.py new file mode 100644 index 0000000..9616b5d --- /dev/null +++ b/server/apps/research/migrations/0010_alter_article_summary_alter_article_title.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0.8 on 2024-08-21 18:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('research', '0009_alter_article_thumb'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='summary', + field=models.CharField(blank=True, max_length=1000), + ), + migrations.AlterField( + model_name='article', + name='title', + field=models.CharField(max_length=500), + ), + ] diff --git a/server/apps/research/migrations/0011_alter_article_summary_alter_article_title_and_more.py b/server/apps/research/migrations/0011_alter_article_summary_alter_article_title_and_more.py new file mode 100644 index 0000000..0bda18e --- /dev/null +++ b/server/apps/research/migrations/0011_alter_article_summary_alter_article_title_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.8 on 2024-08-21 21:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('research', '0010_alter_article_summary_alter_article_title'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='summary', + field=models.TextField(blank=True), + ), + migrations.AlterField( + model_name='article', + name='title', + field=models.TextField(), + ), + migrations.AlterField( + model_name='author', + name='twitter_username', + field=models.CharField(blank=True, max_length=255, null=True), + ), + ] diff --git a/server/apps/research/migrations/0012_alter_article_summary_alter_article_title_and_more.py b/server/apps/research/migrations/0012_alter_article_summary_alter_article_title_and_more.py new file mode 100644 index 0000000..12192cf --- /dev/null +++ b/server/apps/research/migrations/0012_alter_article_summary_alter_article_title_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.8 on 2024-08-21 23:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('research', '0011_alter_article_summary_alter_article_title_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='summary', + field=models.CharField(blank=True, max_length=255), + ), + migrations.AlterField( + model_name='article', + name='title', + field=models.CharField(max_length=255), + ), + migrations.AlterField( + model_name='author', + name='twitter_username', + field=models.CharField(blank=True, max_length=100, null=True), + ), + ] diff --git a/server/apps/research/models/article.py b/server/apps/research/models/article.py index 13c613d..240f3c4 100644 --- a/server/apps/research/models/article.py +++ b/server/apps/research/models/article.py @@ -20,9 +20,9 @@ class Article(BaseModel): ('ready', 'Ready'), ) - title = models.CharField(max_length=500) + title = models.CharField(max_length=255) content = CKEditor5Field('Text', null=True, blank=True, config_name='extends') - summary = models.CharField(max_length=1000, blank=True) + summary = models.CharField(max_length=255, blank=True) authors = models.ManyToManyField(Author, blank=True, related_name='articles') slug = models.SlugField(blank=True) categories = models.ManyToManyField(Category, blank=True, related_name='articles')