32 lines
913 B
Python
32 lines
913 B
Python
|
|
# Generated by Django 4.2.21 for the Audit Log module (admin_api v1.12.0).
|
||
|
|
#
|
||
|
|
# Adds two composite indexes to `AuditLog` so the new /audit-log admin page
|
||
|
|
# can filter by action and resolve "related entries" lookups without a full
|
||
|
|
# table scan once the log grows past a few thousand rows.
|
||
|
|
|
||
|
|
from django.db import migrations, models
|
||
|
|
|
||
|
|
|
||
|
|
class Migration(migrations.Migration):
|
||
|
|
|
||
|
|
dependencies = [
|
||
|
|
('admin_api', '0004_lead_user_account'),
|
||
|
|
]
|
||
|
|
|
||
|
|
operations = [
|
||
|
|
migrations.AddIndex(
|
||
|
|
model_name='auditlog',
|
||
|
|
index=models.Index(
|
||
|
|
fields=['action', '-created_at'],
|
||
|
|
name='auditlog_action_time_idx',
|
||
|
|
),
|
||
|
|
),
|
||
|
|
migrations.AddIndex(
|
||
|
|
model_name='auditlog',
|
||
|
|
index=models.Index(
|
||
|
|
fields=['target_type', 'target_id'],
|
||
|
|
name='auditlog_target_idx',
|
||
|
|
),
|
||
|
|
),
|
||
|
|
]
|