From 9bfdb70f772cdd3a547a0af4f2ee55add76377fd Mon Sep 17 00:00:00 2001
From: Ernesto Rico Schmidt <ernesto@helsinki.at>
Date: Mon, 21 Feb 2022 11:42:56 -0400
Subject: [PATCH] Removed created and last_updated

---
 program/migrations/0014_auto_20220221_1641.py | 37 +++++++++++++++++++
 program/models.py                             |  6 ---
 program/serializers.py                        |  2 +-
 3 files changed, 38 insertions(+), 7 deletions(-)
 create mode 100644 program/migrations/0014_auto_20220221_1641.py

diff --git a/program/migrations/0014_auto_20220221_1641.py b/program/migrations/0014_auto_20220221_1641.py
new file mode 100644
index 00000000..b110c96a
--- /dev/null
+++ b/program/migrations/0014_auto_20220221_1641.py
@@ -0,0 +1,37 @@
+# Generated by Django 3.2.11 on 2022-02-21 15:41
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('program', '0013_auto_20220221_1637'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='note',
+            name='created',
+        ),
+        migrations.RemoveField(
+            model_name='note',
+            name='last_updated',
+        ),
+        migrations.RemoveField(
+            model_name='schedule',
+            name='created',
+        ),
+        migrations.RemoveField(
+            model_name='schedule',
+            name='last_updated',
+        ),
+        migrations.RemoveField(
+            model_name='show',
+            name='created',
+        ),
+        migrations.RemoveField(
+            model_name='show',
+            name='last_updated',
+        ),
+    ]
diff --git a/program/models.py b/program/models.py
index f8cb7657..8dc429ba 100644
--- a/program/models.py
+++ b/program/models.py
@@ -160,8 +160,6 @@ class Show(models.Model):
     website = models.URLField(blank=True, null=True)
     cba_series_id = models.IntegerField(blank=True, null=True)
     default_playlist_id = models.IntegerField(blank=True, null=True)
-    created = models.DateTimeField(auto_now_add=True, editable=False)
-    last_updated = models.DateTimeField(auto_now=True, editable=False)
     is_active = models.BooleanField(default=True)
     is_public = models.BooleanField(default=False)
 
@@ -205,8 +203,6 @@ class Schedule(models.Model):
     add_days_no = models.IntegerField(blank=True, null=True)
     add_business_days_only = models.BooleanField(default=False)
     default_playlist_id = models.IntegerField(blank=True, null=True)
-    created = models.DateTimeField(auto_now_add=True, editable=False, null=True)
-    last_updated = models.DateTimeField(auto_now=True, editable=False, null=True)
 
     class Meta:
         ordering = ('dstart', 'tstart')
@@ -918,8 +914,6 @@ class Note(models.Model):
     show = models.ForeignKey(Show, on_delete=models.CASCADE, related_name='notes', editable=True)
     cba_id = models.IntegerField(blank=True, null=True)
     audio_url = models.TextField(blank=True, editable=False)
-    created = models.DateTimeField(auto_now_add=True, editable=False)
-    last_updated = models.DateTimeField(auto_now=True, editable=False)
     user = models.ForeignKey(User, editable=False, on_delete=models.CASCADE, related_name='users', default=1)
     host = models.ForeignKey(Host, on_delete=models.CASCADE, related_name='hosts', null=True)
 
diff --git a/program/serializers.py b/program/serializers.py
index ad49570e..6c1ea2ad 100644
--- a/program/serializers.py
+++ b/program/serializers.py
@@ -231,7 +231,7 @@ class ShowSerializer(serializers.HyperlinkedModelSerializer):
     class Meta:
         model = Show
         fields = ('id', 'name', 'slug', 'image', 'ppoi', 'logo', 'short_description', 'description',
-                  'email', 'website', 'created', 'last_updated', 'type', 'fundingcategory',
+                  'email', 'website', 'type', 'fundingcategory',
                   'predecessor', 'cba_series_id', 'default_playlist_id', 'category', 'hosts',
                   'owners', 'language', 'topic', 'musicfocus', 'thumbnails', 'is_active', 'is_public')
 
-- 
GitLab