-
Notifications
You must be signed in to change notification settings - Fork 429
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
- Loading branch information
1 parent
24831da
commit dc4e524
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
api/app_analytics/migrations/0005_featureevaluationraw_idx_recent_created_at.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,32 @@ | ||
# 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): | ||
|
||
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