-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(models/featureevaluationraw): Add index on crated_at (#4405)
- Loading branch information
1 parent
ba8cd56
commit 1f90900
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
api/app_analytics/migrations/0005_featureevaluationraw_created_at_idx.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 3.2.25 on 2024-07-29 10:01 | ||
|
||
from django.db import migrations, models | ||
|
||
from core.migration_helpers import PostgresOnlyRunSQL | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
atomic = False | ||
dependencies = [ | ||
("app_analytics", "0004_apiusageraw_count"), | ||
] | ||
|
||
operations = [ | ||
migrations.SeparateDatabaseAndState( | ||
state_operations=[ | ||
migrations.AddIndex( | ||
model_name="featureevaluationraw", | ||
index=models.Index( | ||
fields=["created_at"], | ||
name="f_evaluation_created_at_idx", | ||
), | ||
) | ||
], | ||
database_operations=[ | ||
PostgresOnlyRunSQL( | ||
'CREATE INDEX CONCURRENTLY IF NOT EXISTS "f_evaluation_created_at_idx" ON "app_analytics_featureevaluationraw" ("created_at");', | ||
reverse_sql='DROP INDEX CONCURRENTLY IF EXISTS "f_evaluation_created_at_idx"', | ||
) | ||
], | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters