From 1d1df4a5cbb26a917cf3e97f60ac1d589737bb51 Mon Sep 17 00:00:00 2001 From: DuP-491 Date: Sat, 5 Feb 2022 21:05:13 +0530 Subject: [PATCH] bug fix --- news/migrations/0001_initial.py | 26 +++++++++++++++++++ news/migrations/0002_remove_news_broadcast.py | 17 ++++++++++++ news/migrations/0003_news_broadcast.py | 20 ++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 news/migrations/0001_initial.py create mode 100644 news/migrations/0002_remove_news_broadcast.py create mode 100644 news/migrations/0003_news_broadcast.py diff --git a/news/migrations/0001_initial.py b/news/migrations/0001_initial.py new file mode 100644 index 00000000..714a301b --- /dev/null +++ b/news/migrations/0001_initial.py @@ -0,0 +1,26 @@ +# Generated by Django 3.1.5 on 2022-02-05 11:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='News', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=256)), + ('content', models.TextField()), + ('link', models.URLField(blank=True, null=True)), + ('date', models.DateField(blank=True)), + ('is_open', models.BooleanField(default=False)), + ('broadcast', models.DateTimeField(auto_now_add=True)), + ], + ), + ] diff --git a/news/migrations/0002_remove_news_broadcast.py b/news/migrations/0002_remove_news_broadcast.py new file mode 100644 index 00000000..58b57b13 --- /dev/null +++ b/news/migrations/0002_remove_news_broadcast.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.5 on 2022-02-05 15:04 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('news', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='news', + name='broadcast', + ), + ] diff --git a/news/migrations/0003_news_broadcast.py b/news/migrations/0003_news_broadcast.py new file mode 100644 index 00000000..c6d1e9a2 --- /dev/null +++ b/news/migrations/0003_news_broadcast.py @@ -0,0 +1,20 @@ +# Generated by Django 3.1.5 on 2022-02-05 15:06 + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('news', '0002_remove_news_broadcast'), + ] + + operations = [ + migrations.AddField( + model_name='news', + name='broadcast', + field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), + preserve_default=False, + ), + ]