zilencer: Remove index on RemoteInstallationCount.remote_id.

As in 902498ec4f, we shouldn't need an
index on remote_id alone - only (server_id, remote_id) together.
This commit is contained in:
Mateusz Mandera 2023-10-20 02:08:45 +02:00 committed by Tim Abbott
parent 9ba102f3ea
commit 3cbb651942
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 4.2.6 on 2023-10-20 00:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zilencer", "0029_update_remoterealm_indexes"),
]
operations = [
migrations.AlterField(
model_name="remoteinstallationcount",
name="remote_id",
field=models.IntegerField(),
),
]

View File

@ -133,7 +133,7 @@ class RemoteRealmAuditLog(AbstractRealmAuditLog):
class RemoteInstallationCount(BaseCount): class RemoteInstallationCount(BaseCount):
server = models.ForeignKey(RemoteZulipServer, on_delete=models.CASCADE) server = models.ForeignKey(RemoteZulipServer, on_delete=models.CASCADE)
# The remote_id field lets us deduplicate data from the remote server # The remote_id field lets us deduplicate data from the remote server
remote_id = models.IntegerField(db_index=True) remote_id = models.IntegerField()
class Meta: class Meta:
unique_together = ("server", "property", "subgroup", "end_time") unique_together = ("server", "property", "subgroup", "end_time")