feat: add events app + "multi-tenants" aka multi-events

This commit is contained in:
2026-09-16 00:03:26 +02:00
parent b5c2cdc037
commit 8b9c254fd2
62 changed files with 1343 additions and 362 deletions
@@ -0,0 +1,27 @@
from django.db import migrations
EVENT_PATH = "polylan-43"
def backfill_event(apps, schema_editor):
Event = apps.get_model("events", "Event")
LogfileSubmission = apps.get_model("noita", "LogfileSubmission")
DeathCounter = apps.get_model("noita", "DeathCounter")
event = Event.objects.get(path=EVENT_PATH)
LogfileSubmission.objects.filter(event__isnull=True).update(event=event)
DeathCounter.objects.filter(event__isnull=True).update(event=event)
def noop(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
("noita", "0013_deathcounter_event_logfilesubmission_event"),
("events", "0002_seed_polylan_43"),
]
operations = [
migrations.RunPython(backfill_event, noop),
]