WIP
This commit is contained in:
27
twitch_app/migrations/0002_game_image_url.py
Normal file
27
twitch_app/migrations/0002_game_image_url.py
Normal file
@ -0,0 +1,27 @@
|
||||
# Generated by Django 5.0.6 on 2024-07-01 03:49
|
||||
|
||||
import django.db.models.functions.text
|
||||
from django.db import migrations, models
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies: list[tuple[str, str]] = [
|
||||
("twitch_app", "0001_initial"),
|
||||
]
|
||||
|
||||
operations: list[Operation] = [
|
||||
migrations.AddField(
|
||||
model_name="game",
|
||||
name="image_url",
|
||||
field=models.GeneratedField( # type: ignore # noqa: PGH003
|
||||
db_persist=True,
|
||||
expression=django.db.models.functions.text.Concat(
|
||||
models.Value("https://static-cdn.jtvnw.net/ttv-boxart/"),
|
||||
"id",
|
||||
models.Value("_IGDB.jpg"),
|
||||
),
|
||||
output_field=models.URLField(),
|
||||
),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user