Remove migrations
This commit is contained in:
parent
6bd8271291
commit
2116cfc219
|
@ -1,5 +1,6 @@
|
||||||
# Generated by Django 4.1.4 on 2023-01-02 18:27
|
# Generated by Django 5.1.5 on 2025-01-29 21:26
|
||||||
|
|
||||||
|
import datetime
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
@ -8,94 +9,96 @@ class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = []
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name="Game",
|
name='Device',
|
||||||
fields=[
|
fields=[
|
||||||
(
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
"id",
|
('name', models.CharField(max_length=255)),
|
||||||
models.BigAutoField(
|
('type', models.CharField(choices=[('PC', 'PC'), ('Console', 'Console'), ('Handheld', 'Handheld'), ('Mobile', 'Mobile'), ('Single-board computer', 'Single-board computer'), ('Unknown', 'Unknown')], default='Unknown', max_length=255)),
|
||||||
auto_created=True,
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
primary_key=True,
|
|
||||||
serialize=False,
|
|
||||||
verbose_name="ID",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
("name", models.CharField(max_length=255)),
|
|
||||||
("wikidata", models.CharField(max_length=50)),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name="Platform",
|
name='Platform',
|
||||||
fields=[
|
fields=[
|
||||||
(
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
"id",
|
('name', models.CharField(max_length=255)),
|
||||||
models.BigAutoField(
|
('group', models.CharField(blank=True, default=None, max_length=255, null=True)),
|
||||||
auto_created=True,
|
('icon', models.SlugField(blank=True)),
|
||||||
primary_key=True,
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
serialize=False,
|
|
||||||
verbose_name="ID",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
("name", models.CharField(max_length=255)),
|
|
||||||
("group", models.CharField(max_length=255)),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name="Purchase",
|
name='ExchangeRate',
|
||||||
fields=[
|
fields=[
|
||||||
(
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
"id",
|
('currency_from', models.CharField(max_length=255)),
|
||||||
models.BigAutoField(
|
('currency_to', models.CharField(max_length=255)),
|
||||||
auto_created=True,
|
('year', models.PositiveIntegerField()),
|
||||||
primary_key=True,
|
('rate', models.FloatField()),
|
||||||
serialize=False,
|
],
|
||||||
verbose_name="ID",
|
options={
|
||||||
),
|
'unique_together': {('currency_from', 'currency_to', 'year')},
|
||||||
),
|
},
|
||||||
("date_purchased", models.DateField()),
|
|
||||||
("date_refunded", models.DateField(blank=True, null=True)),
|
|
||||||
(
|
|
||||||
"game",
|
|
||||||
models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="games.game"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
"platform",
|
|
||||||
models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.platform",
|
|
||||||
),
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Game',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
('sort_name', models.CharField(blank=True, default=None, max_length=255, null=True)),
|
||||||
|
('year_released', models.IntegerField(blank=True, default=None, null=True)),
|
||||||
|
('wikidata', models.CharField(blank=True, default=None, max_length=50, null=True)),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('platform', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='games.platform')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'unique_together': {('name', 'platform', 'year_released')},
|
||||||
|
},
|
||||||
),
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Purchase',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('date_purchased', models.DateField()),
|
||||||
|
('date_refunded', models.DateField(blank=True, null=True)),
|
||||||
|
('date_finished', models.DateField(blank=True, null=True)),
|
||||||
|
('date_dropped', models.DateField(blank=True, null=True)),
|
||||||
|
('infinite', models.BooleanField(default=False)),
|
||||||
|
('price', models.FloatField(default=0)),
|
||||||
|
('price_currency', models.CharField(default='USD', max_length=3)),
|
||||||
|
('converted_price', models.FloatField(null=True)),
|
||||||
|
('converted_currency', models.CharField(max_length=3, null=True)),
|
||||||
|
('ownership_type', models.CharField(choices=[('ph', 'Physical'), ('di', 'Digital'), ('du', 'Digital Upgrade'), ('re', 'Rented'), ('bo', 'Borrowed'), ('tr', 'Trial'), ('de', 'Demo'), ('pi', 'Pirated')], default='di', max_length=2)),
|
||||||
|
('type', models.CharField(choices=[('game', 'Game'), ('dlc', 'DLC'), ('season_pass', 'Season Pass'), ('battle_pass', 'Battle Pass')], default='game', max_length=255)),
|
||||||
|
('name', models.CharField(blank=True, default='', max_length=255, null=True)),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('games', models.ManyToManyField(blank=True, related_name='purchases', to='games.game')),
|
||||||
|
('platform', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='games.platform')),
|
||||||
|
('related_purchase', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='related_purchases', to='games.purchase')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name="Session",
|
name='Session',
|
||||||
fields=[
|
fields=[
|
||||||
(
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
"id",
|
('timestamp_start', models.DateTimeField()),
|
||||||
models.BigAutoField(
|
('timestamp_end', models.DateTimeField(blank=True, null=True)),
|
||||||
auto_created=True,
|
('duration_manual', models.DurationField(blank=True, default=datetime.timedelta(0), null=True)),
|
||||||
primary_key=True,
|
('duration_calculated', models.DurationField(blank=True, null=True)),
|
||||||
serialize=False,
|
('note', models.TextField(blank=True, null=True)),
|
||||||
verbose_name="ID",
|
('emulated', models.BooleanField(default=False)),
|
||||||
),
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
),
|
('modified_at', models.DateTimeField(auto_now=True)),
|
||||||
("timestamp_start", models.DateTimeField()),
|
('device', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='games.device')),
|
||||||
("timestamp_end", models.DateTimeField()),
|
('game', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sessions', to='games.game')),
|
||||||
("duration_manual", models.DurationField(blank=True, null=True)),
|
|
||||||
("duration_calculated", models.DurationField(blank=True, null=True)),
|
|
||||||
("note", models.TextField(blank=True, null=True)),
|
|
||||||
(
|
|
||||||
"purchase",
|
|
||||||
models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.purchase",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
|
options={
|
||||||
|
'get_latest_by': 'timestamp_start',
|
||||||
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
# Generated by Django 4.1.4 on 2023-01-02 18:55
|
|
||||||
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0001_initial"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="duration_manual",
|
|
||||||
field=models.DurationField(
|
|
||||||
blank=True, default=datetime.timedelta(0), null=True
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Generated by Django 4.1.4 on 2023-01-02 23:11
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0002_alter_session_duration_manual"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="duration_manual",
|
|
||||||
field=models.DurationField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="timestamp_end",
|
|
||||||
field=models.DateTimeField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,22 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-01-09 14:49
|
|
||||||
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0003_alter_session_duration_manual_and_more"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="duration_manual",
|
|
||||||
field=models.DurationField(
|
|
||||||
blank=True, default=datetime.timedelta(0), null=True
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,35 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-01-09 17:43
|
|
||||||
|
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def set_duration_calculated_none_to_zero(apps, schema_editor):
|
|
||||||
Session = apps.get_model("games", "Session")
|
|
||||||
for session in Session.objects.all():
|
|
||||||
if session.duration_calculated == None:
|
|
||||||
session.duration_calculated = timedelta(0)
|
|
||||||
session.save()
|
|
||||||
|
|
||||||
|
|
||||||
def revert_set_duration_calculated_none_to_zero(apps, schema_editor):
|
|
||||||
Session = apps.get_model("games", "Session")
|
|
||||||
for session in Session.objects.all():
|
|
||||||
if session.duration_calculated == timedelta(0):
|
|
||||||
session.duration_calculated = None
|
|
||||||
session.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0004_alter_session_duration_manual"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(
|
|
||||||
set_duration_calculated_none_to_zero,
|
|
||||||
revert_set_duration_calculated_none_to_zero,
|
|
||||||
)
|
|
||||||
]
|
|
|
@ -1,35 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-01-09 18:04
|
|
||||||
|
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def set_duration_manual_none_to_zero(apps, schema_editor):
|
|
||||||
Session = apps.get_model("games", "Session")
|
|
||||||
for session in Session.objects.all():
|
|
||||||
if session.duration_manual == None:
|
|
||||||
session.duration_manual = timedelta(0)
|
|
||||||
session.save()
|
|
||||||
|
|
||||||
|
|
||||||
def revert_set_duration_manual_none_to_zero(apps, schema_editor):
|
|
||||||
Session = apps.get_model("games", "Session")
|
|
||||||
for session in Session.objects.all():
|
|
||||||
if session.duration_manual == timedelta(0):
|
|
||||||
session.duration_manual = None
|
|
||||||
session.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0005_auto_20230109_1843"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(
|
|
||||||
set_duration_manual_none_to_zero,
|
|
||||||
revert_set_duration_manual_none_to_zero,
|
|
||||||
)
|
|
||||||
]
|
|
|
@ -1,35 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-01-19 18:30
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0006_auto_20230109_1904"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="game",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="games.game"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="platform",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="games.platform"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="purchase",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="games.purchase"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,41 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-18 16:29
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0007_alter_purchase_game_alter_purchase_platform_and_more"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name="Edition",
|
|
||||||
fields=[
|
|
||||||
(
|
|
||||||
"id",
|
|
||||||
models.BigAutoField(
|
|
||||||
auto_created=True,
|
|
||||||
primary_key=True,
|
|
||||||
serialize=False,
|
|
||||||
verbose_name="ID",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
("name", models.CharField(max_length=255)),
|
|
||||||
(
|
|
||||||
"game",
|
|
||||||
models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="games.game"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
"platform",
|
|
||||||
models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="games.platform"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,34 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-18 18:51
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def create_edition_of_game(apps, schema_editor):
|
|
||||||
Game = apps.get_model("games", "Game")
|
|
||||||
Edition = apps.get_model("games", "Edition")
|
|
||||||
Platform = apps.get_model("games", "Platform")
|
|
||||||
first_platform = Platform.objects.first()
|
|
||||||
all_games = Game.objects.all()
|
|
||||||
all_editions = Edition.objects.all()
|
|
||||||
for game in all_games:
|
|
||||||
existing_edition = None
|
|
||||||
try:
|
|
||||||
existing_edition = all_editions.objects.get(game=game.id)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
if existing_edition == None:
|
|
||||||
edition = Edition()
|
|
||||||
edition.id = game.id
|
|
||||||
edition.game = game
|
|
||||||
edition.name = game.name
|
|
||||||
edition.platform = first_platform
|
|
||||||
edition.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0008_edition"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [migrations.RunPython(create_edition_of_game)]
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-18 19:06
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0009_create_editions"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="game",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
on_delete=django.db.models.deletion.CASCADE, to="games.edition"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-18 19:18
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0010_alter_purchase_game"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RenameField(
|
|
||||||
model_name="purchase",
|
|
||||||
old_name="game",
|
|
||||||
new_name="edition",
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-18 19:53
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0011_rename_game_purchase_edition"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="price",
|
|
||||||
field=models.IntegerField(default=0),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="price_currency",
|
|
||||||
field=models.CharField(default="USD", max_length=3),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,31 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-18 19:54
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0012_purchase_price_purchase_price_currency"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="ownership_type",
|
|
||||||
field=models.CharField(
|
|
||||||
choices=[
|
|
||||||
("ph", "Physical"),
|
|
||||||
("di", "Digital"),
|
|
||||||
("du", "Digital Upgrade"),
|
|
||||||
("re", "Rented"),
|
|
||||||
("bo", "Borrowed"),
|
|
||||||
("tr", "Trial"),
|
|
||||||
("de", "Demo"),
|
|
||||||
("pi", "Pirated"),
|
|
||||||
],
|
|
||||||
default="di",
|
|
||||||
max_length=2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,52 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-18 19:59
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0013_purchase_ownership_type"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name="Device",
|
|
||||||
fields=[
|
|
||||||
(
|
|
||||||
"id",
|
|
||||||
models.BigAutoField(
|
|
||||||
auto_created=True,
|
|
||||||
primary_key=True,
|
|
||||||
serialize=False,
|
|
||||||
verbose_name="ID",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
("name", models.CharField(max_length=255)),
|
|
||||||
(
|
|
||||||
"type",
|
|
||||||
models.CharField(
|
|
||||||
choices=[
|
|
||||||
("pc", "PC"),
|
|
||||||
("co", "Console"),
|
|
||||||
("ha", "Handheld"),
|
|
||||||
("mo", "Mobile"),
|
|
||||||
("sbc", "Single-board computer"),
|
|
||||||
],
|
|
||||||
default="pc",
|
|
||||||
max_length=3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="session",
|
|
||||||
name="device",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.device",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-02-20 14:55
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0014_device_session_device"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="edition",
|
|
||||||
name="wikidata",
|
|
||||||
field=models.CharField(blank=True, default=None, max_length=50, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="edition",
|
|
||||||
name="year_released",
|
|
||||||
field=models.IntegerField(default=2023),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,51 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 11:10
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0015_edition_wikidata_edition_year_released"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="edition",
|
|
||||||
name="platform",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.platform",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="edition",
|
|
||||||
name="year_released",
|
|
||||||
field=models.IntegerField(blank=True, default=None, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="game",
|
|
||||||
name="wikidata",
|
|
||||||
field=models.CharField(blank=True, default=None, max_length=50, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="platform",
|
|
||||||
name="group",
|
|
||||||
field=models.CharField(blank=True, default=None, max_length=255, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="device",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.device",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,141 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 18:14
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
def rename_duplicates(apps, schema_editor):
|
|
||||||
Edition = apps.get_model("games", "Edition")
|
|
||||||
|
|
||||||
duplicates = (
|
|
||||||
Edition.objects.values("name", "platform")
|
|
||||||
.annotate(name_count=models.Count("id"))
|
|
||||||
.filter(name_count__gt=1)
|
|
||||||
)
|
|
||||||
|
|
||||||
for duplicate in duplicates:
|
|
||||||
counter = 1
|
|
||||||
duplicate_editions = Edition.objects.filter(
|
|
||||||
name=duplicate["name"], platform_id=duplicate["platform"]
|
|
||||||
).order_by("id")
|
|
||||||
|
|
||||||
for edition in duplicate_editions[1:]: # Skip the first one
|
|
||||||
edition.name = f"{edition.name} {counter}"
|
|
||||||
edition.save()
|
|
||||||
counter += 1
|
|
||||||
|
|
||||||
|
|
||||||
def update_game_year(apps, schema_editor):
|
|
||||||
Game = apps.get_model("games", "Game")
|
|
||||||
Edition = apps.get_model("games", "Edition")
|
|
||||||
|
|
||||||
for game in Game.objects.filter(year__isnull=True):
|
|
||||||
# Try to get the first related edition with a non-null year_released
|
|
||||||
edition = Edition.objects.filter(game=game, year_released__isnull=False).first()
|
|
||||||
if edition:
|
|
||||||
# If an edition is found, update the game's year
|
|
||||||
game.year = edition.year_released
|
|
||||||
game.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
replaces = [
|
|
||||||
("games", "0016_alter_edition_platform_alter_edition_year_released_and_more"),
|
|
||||||
("games", "0017_alter_device_type_alter_purchase_platform"),
|
|
||||||
("games", "0018_auto_20231106_1825"),
|
|
||||||
("games", "0019_alter_edition_unique_together"),
|
|
||||||
("games", "0020_game_year"),
|
|
||||||
("games", "0021_auto_20231106_1909"),
|
|
||||||
("games", "0022_rename_year_game_year_released"),
|
|
||||||
]
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0015_edition_wikidata_edition_year_released"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="edition",
|
|
||||||
name="platform",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.platform",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="edition",
|
|
||||||
name="year_released",
|
|
||||||
field=models.IntegerField(blank=True, default=None, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="game",
|
|
||||||
name="wikidata",
|
|
||||||
field=models.CharField(blank=True, default=None, max_length=50, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="platform",
|
|
||||||
name="group",
|
|
||||||
field=models.CharField(blank=True, default=None, max_length=255, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="device",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.device",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="device",
|
|
||||||
name="type",
|
|
||||||
field=models.CharField(
|
|
||||||
choices=[
|
|
||||||
("pc", "PC"),
|
|
||||||
("co", "Console"),
|
|
||||||
("ha", "Handheld"),
|
|
||||||
("mo", "Mobile"),
|
|
||||||
("sbc", "Single-board computer"),
|
|
||||||
("un", "Unknown"),
|
|
||||||
],
|
|
||||||
default="un",
|
|
||||||
max_length=3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="platform",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.platform",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.RunPython(
|
|
||||||
code=rename_duplicates,
|
|
||||||
),
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name="edition",
|
|
||||||
unique_together={("name", "platform")},
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="game",
|
|
||||||
name="year",
|
|
||||||
field=models.IntegerField(blank=True, default=None, null=True),
|
|
||||||
),
|
|
||||||
migrations.RunPython(
|
|
||||||
code=update_game_year,
|
|
||||||
),
|
|
||||||
migrations.RenameField(
|
|
||||||
model_name="game",
|
|
||||||
old_name="year",
|
|
||||||
new_name="year_released",
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,41 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 16:53
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0016_alter_edition_platform_alter_edition_year_released_and_more"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="device",
|
|
||||||
name="type",
|
|
||||||
field=models.CharField(
|
|
||||||
choices=[
|
|
||||||
("pc", "PC"),
|
|
||||||
("co", "Console"),
|
|
||||||
("ha", "Handheld"),
|
|
||||||
("mo", "Mobile"),
|
|
||||||
("sbc", "Single-board computer"),
|
|
||||||
("un", "Unknown"),
|
|
||||||
],
|
|
||||||
default="un",
|
|
||||||
max_length=3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="platform",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
to="games.platform",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,34 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 17:25
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
def rename_duplicates(apps, schema_editor):
|
|
||||||
Edition = apps.get_model("games", "Edition")
|
|
||||||
|
|
||||||
duplicates = (
|
|
||||||
Edition.objects.values("name", "platform")
|
|
||||||
.annotate(name_count=models.Count("id"))
|
|
||||||
.filter(name_count__gt=1)
|
|
||||||
)
|
|
||||||
|
|
||||||
for duplicate in duplicates:
|
|
||||||
counter = 1
|
|
||||||
duplicate_editions = Edition.objects.filter(
|
|
||||||
name=duplicate["name"], platform_id=duplicate["platform"]
|
|
||||||
).order_by("id")
|
|
||||||
|
|
||||||
for edition in duplicate_editions[1:]: # Skip the first one
|
|
||||||
edition.name = f"{edition.name} {counter}"
|
|
||||||
edition.save()
|
|
||||||
counter += 1
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0017_alter_device_type_alter_purchase_platform"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(rename_duplicates),
|
|
||||||
]
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 17:26
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0018_auto_20231106_1825"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name="edition",
|
|
||||||
unique_together={("name", "platform")},
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 18:05
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0019_alter_edition_unique_together"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="game",
|
|
||||||
name="year",
|
|
||||||
field=models.IntegerField(blank=True, default=None, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,24 +0,0 @@
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def update_game_year(apps, schema_editor):
|
|
||||||
Game = apps.get_model("games", "Game")
|
|
||||||
Edition = apps.get_model("games", "Edition")
|
|
||||||
|
|
||||||
for game in Game.objects.filter(year__isnull=True):
|
|
||||||
# Try to get the first related edition with a non-null year_released
|
|
||||||
edition = Edition.objects.filter(game=game, year_released__isnull=False).first()
|
|
||||||
if edition:
|
|
||||||
# If an edition is found, update the game's year
|
|
||||||
game.year = edition.year_released
|
|
||||||
game.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0020_game_year"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(update_game_year),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 18:12
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0021_auto_20231106_1909"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RenameField(
|
|
||||||
model_name="game",
|
|
||||||
old_name="year",
|
|
||||||
new_name="year_released",
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-06 18:24
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
(
|
|
||||||
"games",
|
|
||||||
"0016_alter_edition_platform_alter_edition_year_released_and_more_squashed_0022_rename_year_game_year_released",
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="date_finished",
|
|
||||||
field=models.DateField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,39 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-09 09:32
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
def create_sort_name(apps, schema_editor):
|
|
||||||
Edition = apps.get_model(
|
|
||||||
"games", "Edition"
|
|
||||||
) # Replace 'your_app_name' with the actual name of your app
|
|
||||||
|
|
||||||
for edition in Edition.objects.all():
|
|
||||||
name = edition.name
|
|
||||||
# Check for articles at the beginning of the name and move them to the end
|
|
||||||
if name.lower().startswith("the "):
|
|
||||||
sort_name = f"{name[4:]}, The"
|
|
||||||
elif name.lower().startswith("a "):
|
|
||||||
sort_name = f"{name[2:]}, A"
|
|
||||||
elif name.lower().startswith("an "):
|
|
||||||
sort_name = f"{name[3:]}, An"
|
|
||||||
else:
|
|
||||||
sort_name = name
|
|
||||||
# Save the sort_name back to the database
|
|
||||||
edition.sort_name = sort_name
|
|
||||||
edition.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0023_purchase_date_finished"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="edition",
|
|
||||||
name="sort_name",
|
|
||||||
field=models.CharField(blank=True, default=None, max_length=255, null=True),
|
|
||||||
),
|
|
||||||
migrations.RunPython(create_sort_name),
|
|
||||||
]
|
|
|
@ -1,39 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-09 09:32
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
def create_sort_name(apps, schema_editor):
|
|
||||||
Game = apps.get_model(
|
|
||||||
"games", "Game"
|
|
||||||
) # Replace 'your_app_name' with the actual name of your app
|
|
||||||
|
|
||||||
for game in Game.objects.all():
|
|
||||||
name = game.name
|
|
||||||
# Check for articles at the beginning of the name and move them to the end
|
|
||||||
if name.lower().startswith("the "):
|
|
||||||
sort_name = f"{name[4:]}, The"
|
|
||||||
elif name.lower().startswith("a "):
|
|
||||||
sort_name = f"{name[2:]}, A"
|
|
||||||
elif name.lower().startswith("an "):
|
|
||||||
sort_name = f"{name[3:]}, An"
|
|
||||||
else:
|
|
||||||
sort_name = name
|
|
||||||
# Save the sort_name back to the database
|
|
||||||
game.sort_name = sort_name
|
|
||||||
game.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0024_edition_sort_name"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="game",
|
|
||||||
name="sort_name",
|
|
||||||
field=models.CharField(blank=True, default=None, max_length=255, null=True),
|
|
||||||
),
|
|
||||||
migrations.RunPython(create_sort_name),
|
|
||||||
]
|
|
|
@ -1,27 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-14 08:35
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0025_game_sort_name"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="type",
|
|
||||||
field=models.CharField(
|
|
||||||
choices=[
|
|
||||||
("game", "Game"),
|
|
||||||
("dlc", "DLC"),
|
|
||||||
("season_pass", "Season Pass"),
|
|
||||||
("battle_pass", "Battle Pass"),
|
|
||||||
],
|
|
||||||
default="game",
|
|
||||||
max_length=255,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-14 08:41
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0026_purchase_type"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="related_purchase",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.SET_NULL,
|
|
||||||
to="games.purchase",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-14 11:05
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
from games.models import Purchase
|
|
||||||
|
|
||||||
|
|
||||||
def null_game_name(apps, schema_editor):
|
|
||||||
Purchase.objects.filter(type=Purchase.GAME).update(name=None)
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0027_purchase_related_purchase"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="name",
|
|
||||||
field=models.CharField(
|
|
||||||
blank=True, default="Unknown Name", max_length=255, null=True
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.RunPython(null_game_name),
|
|
||||||
]
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-14 21:19
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0028_purchase_name"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="related_purchase",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.SET_NULL,
|
|
||||||
related_name="related_purchases",
|
|
||||||
to="games.purchase",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-15 12:04
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0029_alter_purchase_related_purchase"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="name",
|
|
||||||
field=models.CharField(blank=True, default="", max_length=255, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,44 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-15 13:51
|
|
||||||
|
|
||||||
import django.utils.timezone
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0030_alter_purchase_name"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="device",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="edition",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="game",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="platform",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="session",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,52 +0,0 @@
|
||||||
# Generated by Django 4.1.5 on 2023-11-15 18:02
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0031_device_created_at_edition_created_at_game_created_at_and_more"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterModelOptions(
|
|
||||||
name="session",
|
|
||||||
options={"get_latest_by": "timestamp_start"},
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="session",
|
|
||||||
name="modified_at",
|
|
||||||
field=models.DateTimeField(auto_now=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="device",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(auto_now_add=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="edition",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(auto_now_add=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="game",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(auto_now_add=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="platform",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(auto_now_add=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(auto_now_add=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="created_at",
|
|
||||||
field=models.DateTimeField(auto_now_add=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Generated by Django 4.2.7 on 2023-11-28 13:43
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0032_alter_session_options_session_modified_at_and_more"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name="edition",
|
|
||||||
unique_together={("name", "platform", "year_released")},
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Generated by Django 4.2.7 on 2024-01-03 21:27
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0033_alter_edition_unique_together"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="date_dropped",
|
|
||||||
field=models.DateField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="infinite",
|
|
||||||
field=models.BooleanField(default=False),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Generated by Django 5.1 on 2024-08-11 15:50
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("games", "0034_purchase_date_dropped_purchase_infinite"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="device",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.SET_DEFAULT,
|
|
||||||
to="games.device",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,19 +0,0 @@
|
||||||
# Generated by Django 5.1 on 2024-08-11 16:48
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0035_alter_session_device'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='edition',
|
|
||||||
name='platform',
|
|
||||||
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='games.platform'),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Generated by Django 5.1.1 on 2024-09-14 07:05
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
from django.utils.text import slugify
|
|
||||||
|
|
||||||
|
|
||||||
def update_empty_icons(apps, schema_editor):
|
|
||||||
Platform = apps.get_model("games", "Platform")
|
|
||||||
for platform in Platform.objects.filter(icon=""):
|
|
||||||
platform.icon = slugify(platform.name)
|
|
||||||
platform.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0036_alter_edition_platform"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="platform",
|
|
||||||
name="icon",
|
|
||||||
field=models.SlugField(blank=True),
|
|
||||||
),
|
|
||||||
migrations.RunPython(update_empty_icons),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 5.1.1 on 2024-10-04 09:23
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0037_platform_icon'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='purchase',
|
|
||||||
name='price',
|
|
||||||
field=models.FloatField(default=0),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 5.1.2 on 2024-11-09 22:38
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0038_alter_purchase_price'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='device',
|
|
||||||
name='type',
|
|
||||||
field=models.CharField(choices=[('PC', 'PC'), ('Console', 'Console'), ('Handheld', 'Handheld'), ('Mobile', 'Mobile'), ('Single-board computer', 'Single-board computer'), ('Unknown', 'Unknown')], default='Unknown', max_length=255),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Generated by Django 5.1.2 on 2024-11-09 22:39
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def update_device_types(apps, schema_editor):
|
|
||||||
Device = apps.get_model("games", "Device")
|
|
||||||
|
|
||||||
# Mapping of short names to long names
|
|
||||||
type_map = {
|
|
||||||
"pc": "PC",
|
|
||||||
"co": "Console",
|
|
||||||
"ha": "Handheld",
|
|
||||||
"mo": "Mobile",
|
|
||||||
"sbc": "Single-board computer",
|
|
||||||
"un": "Unknown",
|
|
||||||
}
|
|
||||||
|
|
||||||
# Loop through all devices and update the type field
|
|
||||||
for device in Device.objects.all():
|
|
||||||
if device.type in type_map:
|
|
||||||
device.type = type_map[device.type]
|
|
||||||
device.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0039_alter_device_type"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(update_device_types),
|
|
||||||
]
|
|
|
@ -1,36 +0,0 @@
|
||||||
# Generated by Django 5.1.3 on 2024-11-10 15:14
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0040_migrate_device_types'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='purchase',
|
|
||||||
name='converted_currency',
|
|
||||||
field=models.CharField(max_length=3, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='purchase',
|
|
||||||
name='converted_price',
|
|
||||||
field=models.FloatField(null=True),
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='ExchangeRate',
|
|
||||||
fields=[
|
|
||||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('currency_from', models.CharField(max_length=255)),
|
|
||||||
('currency_to', models.CharField(max_length=255)),
|
|
||||||
('year', models.PositiveIntegerField()),
|
|
||||||
('rate', models.FloatField()),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'unique_together': {('currency_from', 'currency_to', 'year')},
|
|
||||||
},
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 5.1.3 on 2025-01-07 20:14
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0041_purchase_converted_currency_purchase_converted_price_and_more'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='purchase',
|
|
||||||
name='editions_temp',
|
|
||||||
field=models.ManyToManyField(blank=True, related_name='temp_purchases', to='games.edition'),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,27 +0,0 @@
|
||||||
# Generated by Django 5.1.3 on 2025-01-07 20:17
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
def migrate_edition_to_editions_temp(apps, schema_editor):
|
|
||||||
Purchase = apps.get_model("games", "Purchase")
|
|
||||||
for purchase in Purchase.objects.all():
|
|
||||||
if purchase.edition:
|
|
||||||
print(
|
|
||||||
f"Migrating Purchase {purchase.id} with Edition {purchase.edition.id}"
|
|
||||||
)
|
|
||||||
purchase.editions_temp.add(purchase.edition)
|
|
||||||
print(purchase.editions_temp.all())
|
|
||||||
purchase.save()
|
|
||||||
else:
|
|
||||||
print(f"No edition found for Purchase {purchase.id}")
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0042_purchase_editions_temp"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RunPython(migrate_edition_to_editions_temp),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 5.1.3 on 2025-01-07 20:32
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0043_auto_20250107_2117"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(model_name="purchase", name="edition"),
|
|
||||||
migrations.RenameField(
|
|
||||||
model_name="purchase",
|
|
||||||
old_name="editions_temp",
|
|
||||||
new_name="editions",
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 5.1.3 on 2025-01-07 20:37
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0044_auto_20250107_2132'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='purchase',
|
|
||||||
name='editions',
|
|
||||||
field=models.ManyToManyField(blank=True, related_name='purchases', to='games.edition'),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Generated by Django 5.1.3 on 2025-01-29 11:49
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0045_alter_purchase_editions'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='session',
|
|
||||||
name='emulated',
|
|
||||||
field=models.BooleanField(default=False),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,19 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 17:01
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0046_session_emulated'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='edition',
|
|
||||||
name='game',
|
|
||||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='editions', to='games.game'),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,61 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 17:08
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
from games.models import Game
|
|
||||||
|
|
||||||
|
|
||||||
def copy_platform_to_game(apps, schema_editor):
|
|
||||||
single_edition_games = Game.objects.annotate(
|
|
||||||
num_editions=models.Count("editions")
|
|
||||||
).filter(num_editions=1)
|
|
||||||
multi_edition_games = Game.objects.annotate(
|
|
||||||
num_editions=models.Count("editions")
|
|
||||||
).filter(num_editions__gt=1)
|
|
||||||
for game in single_edition_games:
|
|
||||||
game.platform = game.editions.first().platform
|
|
||||||
game.save()
|
|
||||||
|
|
||||||
for game in multi_edition_games:
|
|
||||||
all_editions = game.editions.all()
|
|
||||||
for e in all_editions:
|
|
||||||
# game with this platform edition already exists
|
|
||||||
if game.platform == e.platform:
|
|
||||||
print(
|
|
||||||
f"Game '{game}' with ID '{game.pk}' already has edition with platform '{game.platform}', skipping creation."
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
print(
|
|
||||||
f"Game '{game}' with ID '{game.pk}' missing edition with platform '{e.platform}', creating..."
|
|
||||||
)
|
|
||||||
newgame = Game.objects.create(
|
|
||||||
name=e.name,
|
|
||||||
sort_name=e.sort_name,
|
|
||||||
platform=e.platform,
|
|
||||||
year_released=e.year_released,
|
|
||||||
)
|
|
||||||
print(f"Setting edition to a newly created game with id '{newgame.pk}'")
|
|
||||||
e.game = newgame
|
|
||||||
e.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0047_alter_edition_game"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="game",
|
|
||||||
name="platform",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.SET_DEFAULT,
|
|
||||||
to="games.platform",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.RunPython(copy_platform_to_game),
|
|
||||||
]
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 17:34
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0048_game_platform'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterUniqueTogether(
|
|
||||||
name='game',
|
|
||||||
unique_together={('name', 'platform', 'year_released')},
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,35 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 17:48
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
from games.models import Session
|
|
||||||
|
|
||||||
|
|
||||||
def connect_session_to_game(apps, schema_editor):
|
|
||||||
for session in Session.objects.all():
|
|
||||||
game = session.purchase.first_edition.game
|
|
||||||
session.game = game
|
|
||||||
session.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0049_alter_game_unique_together"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="session",
|
|
||||||
name="game",
|
|
||||||
field=models.ForeignKey(
|
|
||||||
blank=True,
|
|
||||||
default=None,
|
|
||||||
null=True,
|
|
||||||
on_delete=django.db.models.deletion.CASCADE,
|
|
||||||
related_name="sessions",
|
|
||||||
to="games.game",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.RunPython(connect_session_to_game),
|
|
||||||
]
|
|
|
@ -1,29 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 18:03
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
from games.models import Purchase
|
|
||||||
|
|
||||||
|
|
||||||
def connect_purchase_to_game(apps, schema_editor):
|
|
||||||
for purchase in Purchase.objects.all():
|
|
||||||
game = purchase.first_edition.game
|
|
||||||
purchase.games.add(game)
|
|
||||||
purchase.save()
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
dependencies = [
|
|
||||||
("games", "0050_session_game"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="purchase",
|
|
||||||
name="games",
|
|
||||||
field=models.ManyToManyField(
|
|
||||||
blank=True, related_name="purchases", to="games.game"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
migrations.RunPython(connect_purchase_to_game),
|
|
||||||
]
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 18:20
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0051_purchase_games'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='purchase',
|
|
||||||
name='editions',
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,16 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 19:21
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0052_remove_purchase_editions'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.DeleteModel(
|
|
||||||
name='Edition',
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Generated by Django 5.1.5 on 2025-01-29 19:21
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('games', '0053_delete_edition'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='session',
|
|
||||||
name='purchase',
|
|
||||||
),
|
|
||||||
]
|
|
Loading…
Reference in New Issue