Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add migrations #451

Merged
merged 4 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions blossom/api/migrations/0027_auto_20221004_2042.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.15 on 2022-10-04 20:42

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("api", "0026_auto_20220825_1917"),
]

operations = [
migrations.AlterField(
model_name="submission",
name="content_url",
field=models.URLField(blank=True, max_length=2000, null=True),
),
migrations.AlterField(
model_name="submission",
name="tor_url",
field=models.URLField(blank=True, max_length=2000, null=True),
),
migrations.AlterField(
model_name="submission",
name="url",
field=models.URLField(blank=True, max_length=2000, null=True),
),
migrations.AlterField(
model_name="transcription",
name="url",
field=models.URLField(blank=True, max_length=2000, null=True),
),
]
8 changes: 4 additions & 4 deletions blossom/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,17 @@ class Meta:
title = models.CharField(max_length=300, blank=True, null=True)

# The URL to the Submission directly on its source.
url = models.URLField(null=True, blank=True)
url = models.URLField(null=True, blank=True, max_length=2000)

# The URL to the Submission on /r/TranscribersOfReddit.
tor_url = models.URLField(null=True, blank=True)
tor_url = models.URLField(null=True, blank=True, max_length=2000)

# Whether the post has been archived, for example by /u/tor_archivist.
archived = models.BooleanField(default=False)

# A link to the content that the submission is about. An image, audio, video, etc.
# If this is an image, it is sent to ocr.space for automatic transcription.
content_url = models.URLField(null=True, blank=True)
content_url = models.URLField(null=True, blank=True, max_length=2000)

# If this is from Reddit, then it mirrors the status on Reddit's side that we get
# from PRAW. Otherwise it can be set manually to mark something that shouldn't be
Expand Down Expand Up @@ -331,7 +331,7 @@ class Meta:
)

# The URL to the Transcription on the source platform.
url = models.URLField(null=True, blank=True)
url = models.URLField(null=True, blank=True, max_length=2000)

# The text of the transcription. We force the SQL longtext type, per
# https://stackoverflow.com/a/23169977.
Expand Down