forked from WeblateOrg/weblate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: bring back indexes on SET_NULL foreign keys
While these are not used during normal operations, they are necessary for UPDATE queries when deleting the content. Otherwise they end up as full table scans.
- Loading branch information
Showing
3 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
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
63 changes: 63 additions & 0 deletions
63
weblate/trans/migrations/0005_alter_change_alert_alter_change_announcement_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,63 @@ | ||
# Copyright © Michal Čihař <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# Generated by Django 4.2.5 on 2023-10-11 12:49 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("screenshots", "0001_squashed_weblate_5"), | ||
("trans", "0004_alter_change_action"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="change", | ||
name="alert", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="trans.alert", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="change", | ||
name="announcement", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="trans.announcement", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="change", | ||
name="comment", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="trans.comment", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="change", | ||
name="screenshot", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="screenshots.screenshot", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="change", | ||
name="suggestion", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="trans.suggestion", | ||
), | ||
), | ||
] |
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