Refactor database configuration to support PostgreSQL, add GIN index for operation_names, and enhance backup functionality

This commit is contained in:
Joakim Hellsén 2026-02-13 23:27:18 +01:00
commit c41524e517
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
11 changed files with 250 additions and 74 deletions

View file

@ -0,0 +1,24 @@
# Generated by Django 6.0.2 on 2026-02-12 12:00
from __future__ import annotations
from django.contrib.postgres.indexes import GinIndex
from django.db import migrations
class Migration(migrations.Migration):
"""Replace the JSONField btree index with a GIN index for Postgres."""
dependencies = [
("twitch", "0011_dropbenefit_image_height_dropbenefit_image_width_and_more"),
]
operations = [
migrations.RemoveIndex(
model_name="dropcampaign",
name="twitch_drop_operati_fe3bc8_idx",
),
migrations.AddIndex(
model_name="dropcampaign",
index=GinIndex(fields=["operation_names"], name="twitch_drop_operati_gin_idx"),
),
]