Skip to content

Commit

Permalink
Rename indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Aug 21, 2024
1 parent be48707 commit ff1df2c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.1 on 2024-08-21 15:48

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("dashblocks", "0012_rename_dashblocks__org_id_024805_idx_dashblock_org_typ_prio_idx_and_more"),
]

operations = [
migrations.RenameIndex(
model_name="dashblock",
new_name="dashblock_org_typ_prio_idx",
old_name="dashblocks__org_id_024805_idx",
),
migrations.RenameIndex(
model_name="dashblocktype",
new_name="dashblocktype_slug_name_idx",
old_name="dashblocks__slug_c0c6c6_idx",
),
]
6 changes: 2 additions & 4 deletions dash/dashblocks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __str__(self):

class Meta:
ordering = ["name"]
indexes = [models.Index(fields=["slug", "name"], name="dashblocks__slug_c0c6c6_idx")]
indexes = [models.Index(fields=["slug", "name"], name="dashblocktype_slug_name_idx")]


class DashBlock(SmartModel):
Expand Down Expand Up @@ -150,9 +150,7 @@ def __str__(self):
class Meta:
ordering = ["dashblock_type", "title"]
indexes = [
models.Index(
fields=["org", "is_active", "dashblock_type", "priority"], name="dashblocks__org_id_024805_idx"
)
models.Index(fields=["org", "is_active", "dashblock_type", "priority"], name="dashblock_org_typ_prio_idx")
]


Expand Down

0 comments on commit ff1df2c

Please sign in to comment.