Add API
This commit is contained in:
@ -2,14 +2,15 @@
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
dependencies: list[tuple[str, str]] = []
|
||||
|
||||
operations = [
|
||||
operations: list[Operation] = [
|
||||
migrations.CreateModel(
|
||||
name="Channel",
|
||||
fields=[
|
||||
|
@ -2,14 +2,15 @@
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
dependencies: list[tuple[str, str]] = [
|
||||
("twitch", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
operations: list[Operation] = [
|
||||
migrations.AlterModelOptions(
|
||||
name="dropcampaign",
|
||||
options={"verbose_name_plural": "Drop Campaigns"},
|
||||
|
@ -0,0 +1,83 @@
|
||||
# Generated by Django 5.1a1 on 2024-06-22 19:21
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies: list[tuple[str, str]] = [
|
||||
("twitch", "0002_alter_dropcampaign_options_alter_dropcampaign_game_and_more"),
|
||||
]
|
||||
|
||||
operations: list[Operation] = [
|
||||
migrations.AddField(
|
||||
model_name="channel",
|
||||
name="added_at",
|
||||
field=models.DateTimeField(auto_now_add=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="channel",
|
||||
name="modified_at",
|
||||
field=models.DateTimeField(auto_now=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="dropbenefit",
|
||||
name="added_at",
|
||||
field=models.DateTimeField(auto_now_add=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="dropbenefit",
|
||||
name="modified_at",
|
||||
field=models.DateTimeField(auto_now=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="dropcampaign",
|
||||
name="added_at",
|
||||
field=models.DateTimeField(auto_now_add=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="dropcampaign",
|
||||
name="modified_at",
|
||||
field=models.DateTimeField(auto_now=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="game",
|
||||
name="added_at",
|
||||
field=models.DateTimeField(auto_now_add=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="game",
|
||||
name="modified_at",
|
||||
field=models.DateTimeField(auto_now=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="organization",
|
||||
name="added_at",
|
||||
field=models.DateTimeField(auto_now_add=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="organization",
|
||||
name="modified_at",
|
||||
field=models.DateTimeField(auto_now=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="timebaseddrop",
|
||||
name="added_at",
|
||||
field=models.DateTimeField(auto_now_add=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="timebaseddrop",
|
||||
name="modified_at",
|
||||
field=models.DateTimeField(auto_now=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="user",
|
||||
name="added_at",
|
||||
field=models.DateTimeField(auto_now_add=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="user",
|
||||
name="modified_at",
|
||||
field=models.DateTimeField(auto_now=True, null=True),
|
||||
),
|
||||
]
|
17
twitch/migrations/0004_alter_dropcampaign_options.py
Normal file
17
twitch/migrations/0004_alter_dropcampaign_options.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.1a1 on 2024-06-22 19:27
|
||||
|
||||
from django.db import migrations
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies: list[tuple[str, str]] = [
|
||||
("twitch", "0003_channel_added_at_channel_modified_at_and_more"),
|
||||
]
|
||||
|
||||
operations: list[Operation] = [
|
||||
migrations.AlterModelOptions(
|
||||
name="dropcampaign",
|
||||
options={},
|
||||
),
|
||||
]
|
26
twitch/migrations/0005_game_twitch_url.py
Normal file
26
twitch/migrations/0005_game_twitch_url.py
Normal file
@ -0,0 +1,26 @@
|
||||
# Generated by Django 5.1a1 on 2024-06-22 20:05
|
||||
|
||||
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", "0004_alter_dropcampaign_options"),
|
||||
]
|
||||
|
||||
operations: list[Operation] = [
|
||||
migrations.AddField(
|
||||
model_name="game",
|
||||
name="twitch_url",
|
||||
field=models.GeneratedField( # type: ignore # noqa: PGH003
|
||||
db_persist=True,
|
||||
expression=django.db.models.functions.text.Concat(
|
||||
models.Value("https://www.twitch.tv/directory/category/"),
|
||||
"slug",
|
||||
),
|
||||
output_field=models.TextField(),
|
||||
),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user