Skip to content

Commit

Permalink
Add missing indexes for SafeContractDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Nov 7, 2023
1 parent 4d3e876 commit 05e2c82
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.6 on 2023-11-06 11:27

from django.db import migrations

import gnosis.eth.django.models


class Migration(migrations.Migration):
dependencies = [
("history", "0076_alter_safemastercopy_deployer"),
]

operations = [
migrations.AlterField(
model_name="safecontractdelegate",
name="delegate",
field=gnosis.eth.django.models.EthereumAddressV2Field(db_index=True),
),
migrations.AlterField(
model_name="safecontractdelegate",
name="delegator",
field=gnosis.eth.django.models.EthereumAddressV2Field(db_index=True),
),
]
4 changes: 2 additions & 2 deletions safe_transaction_service/history/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,8 +1761,8 @@ class SafeContractDelegate(models.Model):
null=True,
default=None,
) # If safe_contract is not defined, delegate is valid for every Safe which delegator is an owner
delegate = EthereumAddressV2Field()
delegator = EthereumAddressV2Field() # Owner who created the delegate
delegate = EthereumAddressV2Field(db_index=True)
delegator = EthereumAddressV2Field(db_index=True) # Owner who created the delegate
label = models.CharField(max_length=50)
read = models.BooleanField(default=True) # For permissions in the future
write = models.BooleanField(default=True)
Expand Down

0 comments on commit 05e2c82

Please sign in to comment.