Add new field to scrobbles for page data
This commit is contained in:
@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-22 00:53
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("scrobbles", "0045_scrobble_webpage_alter_scrobble_media_type"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="scrobble",
|
||||||
|
name="book_page_data",
|
||||||
|
field=models.JSONField(blank=True, null=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="chartrecord",
|
||||||
|
name="year",
|
||||||
|
field=models.IntegerField(blank=True, null=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -338,7 +338,7 @@ class ChartRecord(TimeStampedModel):
|
|||||||
user = models.ForeignKey(User, on_delete=models.DO_NOTHING, **BNULL)
|
user = models.ForeignKey(User, on_delete=models.DO_NOTHING, **BNULL)
|
||||||
rank = models.IntegerField(db_index=True)
|
rank = models.IntegerField(db_index=True)
|
||||||
count = models.IntegerField(default=0)
|
count = models.IntegerField(default=0)
|
||||||
year = models.IntegerField(default=timezone.now().year)
|
year = models.IntegerField(**BNULL)
|
||||||
month = models.IntegerField(**BNULL)
|
month = models.IntegerField(**BNULL)
|
||||||
week = models.IntegerField(**BNULL)
|
week = models.IntegerField(**BNULL)
|
||||||
day = models.IntegerField(**BNULL)
|
day = models.IntegerField(**BNULL)
|
||||||
@ -522,6 +522,7 @@ class Scrobble(TimeStampedModel):
|
|||||||
|
|
||||||
# Fields for keeping track long content like books and games
|
# Fields for keeping track long content like books and games
|
||||||
book_pages_read = models.IntegerField(**BNULL)
|
book_pages_read = models.IntegerField(**BNULL)
|
||||||
|
book_page_data = models.JSONField(**BNULL)
|
||||||
videogame_save_data = models.FileField(
|
videogame_save_data = models.FileField(
|
||||||
upload_to="scrobbles/videogame_save_data/", **BNULL
|
upload_to="scrobbles/videogame_save_data/", **BNULL
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user