-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add index for logger_xform and logger_project deleted_at fields
- Loading branch information
1 parent
2f530ae
commit dcfe33a
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
onadata/apps/logger/migrations/0024_project_idx_logger_project_deleted_at_and_more.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,46 @@ | ||
# Generated by Django 4.2.14 on 2024-09-06 14:56 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
atomic = False | ||
dependencies = [ | ||
('logger', '0023_populate_project_entity_list_perm'), | ||
] | ||
|
||
operations = [ | ||
migrations.SeparateDatabaseAndState( | ||
database_operations=[ | ||
migrations.RunSQL( | ||
sql=( | ||
'CREATE INDEX CONCURRENTLY "idx_logger_project_deleted_at" ' | ||
'ON "logger_project" ("deleted_at");' | ||
), | ||
reverse_sql='DROP INDEX CONCURRENTLY "idx_logger_project_deleted_at";', | ||
), | ||
migrations.RunSQL( | ||
sql=( | ||
'CREATE INDEX CONCURRENTLY "idx_logger_xform_deleted_at" ' | ||
'ON "logger_xform" ("deleted_at");' | ||
), | ||
reverse_sql='DROP INDEX CONCURRENTLY "idx_logger_xform_deleted_at";', | ||
), | ||
], | ||
state_operations=[ | ||
migrations.AddIndex( | ||
model_name="project", | ||
index=models.Index( | ||
fields=["deleted_at"], name="idx_logger_project_deleted_at" | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="xform", | ||
index=models.Index( | ||
fields=["deleted_at"], name="idx_logger_xform_deleted_at" | ||
), | ||
), | ||
], | ||
) | ||
] | ||
|