Ver código fonte

[scrobbles] Migrate scrobble log to JSON field

Colin Powell 1 ano atrás
pai
commit
1dcd151c65

+ 18 - 0
vrobbler/apps/scrobbles/migrations/0051_alter_scrobble_scrobble_log.py

@@ -0,0 +1,18 @@
+# Generated by Django 4.2.9 on 2024-04-05 14:39
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("scrobbles", "0050_delete_scrobbledpage"),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="scrobble",
+            name="scrobble_log",
+            field=models.JSONField(blank=True, null=True),
+        ),
+    ]

+ 1 - 1
vrobbler/apps/scrobbles/models.py

@@ -522,7 +522,7 @@ class Scrobble(TimeStampedModel):
     # Metadata
     source = models.CharField(max_length=255, **BNULL)
     source_id = models.TextField(**BNULL)
-    scrobble_log = models.TextField(**BNULL)
+    scrobble_log = models.JSONField(**BNULL)
     notes = models.TextField(**BNULL)
 
     # Fields for keeping track of book data