Skip to content

Commit

Permalink
Merge pull request #2741 from uktrade/fix/add-application-instace-ind…
Browse files Browse the repository at this point in the history
…ex-state

adding state as index to ApplicationInstace model to improve performance
  • Loading branch information
sekharpanja authored Aug 24, 2023
2 parents 883efe5 + 43dbd33 commit 61571fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated by Django 3.2.20 on 2023-08-24 20:25

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("applications", "0022_auto_20230531_1549"),
]

operations = [
migrations.AddIndex(
model_name="applicationinstance",
index=models.Index(fields=["state"], name="app_applica_state_9beedf_idx"),
),
]
1 change: 1 addition & 0 deletions dataworkspace/dataworkspace/apps/applications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ class Meta:
models.Index(fields=["created_date"]),
models.Index(fields=["owner", "created_date"]),
models.Index(fields=["public_host", "state"]),
models.Index(fields=["state"]),
]
permissions = [
("start_all_applications", "Can start all applications"),
Expand Down

0 comments on commit 61571fc

Please sign in to comment.