Refactor database configuration to support PostgreSQL, add GIN index for operation_names, and enhance backup functionality
This commit is contained in:
parent
477bb753ae
commit
c41524e517
11 changed files with 250 additions and 74 deletions
|
|
@ -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"),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue