zilencer: Drop the index from RemotePushDeviceToken.user_id.

The index isn't used, because our unique_index entries provide better
indexes for the queries.
This commit is contained in:
Mateusz Mandera 2022-03-10 13:35:39 +01:00 committed by Tim Abbott
parent 76ff9b30b1
commit f90beae616
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2022-03-10 12:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zilencer", "0024_remotepushdevicetoken_user_uuid"),
]
operations = [
migrations.AlterField(
model_name="remotepushdevicetoken",
name="user_id",
field=models.BigIntegerField(null=True),
),
]

View File

@ -63,7 +63,7 @@ class RemotePushDeviceToken(AbstractPushDeviceToken):
server: RemoteZulipServer = models.ForeignKey(RemoteZulipServer, on_delete=models.CASCADE) server: RemoteZulipServer = models.ForeignKey(RemoteZulipServer, on_delete=models.CASCADE)
# The user id on the remote server for this device # The user id on the remote server for this device
user_id: int = models.BigIntegerField(db_index=True, null=True) user_id: int = models.BigIntegerField(null=True)
user_uuid: UUID = models.UUIDField(null=True) user_uuid: UUID = models.UUIDField(null=True)
class Meta: class Meta: