Files
Sith/galaxy/migrations/0002_auto_20230412_1130.py
Skia 31093fff43 galaxy: big refactor
Main changes:
  - Multiple Galaxy objects can now exist at the same time in DB. This allows for ruling a new galaxy while still
    displaying the old one.
  - The criteria to quickly know whether a user is a possible citizen is now a simple query on picture count. This
    avoids a very complicated query to database, that could often result in huge working memory load. With this change,
    it should be possible to run the galaxy even on a vanilla Postgres that didn't receive fine tuning for the Sith's
    galaxy.
2023-05-10 12:15:19 +02:00

46 lines
1.4 KiB
Python

# Generated by Django 3.2.16 on 2023-04-12 09:30
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("galaxy", "0001_initial"),
]
operations = [
migrations.AlterModelOptions(
name="galaxy",
options={"ordering": ["pk"]},
),
migrations.AddField(
model_name="galaxystar",
name="galaxy",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="stars",
to="galaxy.galaxy",
verbose_name="the galaxy this star belongs to",
),
),
migrations.AlterField(
model_name="galaxy",
name="state",
field=models.JSONField(null=True, verbose_name="The galaxy current state"),
),
migrations.AlterField(
model_name="galaxystar",
name="owner",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="stars",
to=settings.AUTH_USER_MODEL,
verbose_name="star owner",
),
),
]