-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add `safe` field so it can be indexed propertly - This PR will speed up transaction processing speed
- Loading branch information
Showing
13 changed files
with
162 additions
and
67 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
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
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
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
43 changes: 43 additions & 0 deletions
43
safe_transaction_service/history/migrations/0091_add_safe_internal_tx_decoded.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,43 @@ | ||
# Generated by Django 5.0.9 on 2024-11-04 13:16 | ||
|
||
from django.db import migrations, models | ||
|
||
import safe_eth.eth.django.models | ||
from safe_eth.eth.constants import NULL_ADDRESS | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("history", "0090_multisigtransaction_proposed_by_delegate"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveIndex( | ||
model_name="internaltxdecoded", | ||
name="history_decoded_processed_idx", | ||
), | ||
migrations.AddField( | ||
model_name="internaltxdecoded", | ||
name="safe", | ||
field=safe_eth.eth.django.models.EthereumAddressBinaryField( | ||
db_index=True, default=NULL_ADDRESS | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.RunSQL( | ||
""" | ||
UPDATE "history_internaltxdecoded" decoded SET safe = internal._from | ||
FROM "history_internaltx" internal | ||
WHERE internal.id = decoded.internal_tx_id | ||
""" | ||
), | ||
migrations.AddIndex( | ||
model_name="internaltxdecoded", | ||
index=models.Index( | ||
condition=models.Q(("processed", False)), | ||
fields=["safe"], | ||
name="history_decoded_processed_idx", | ||
), | ||
), | ||
] |
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
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
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
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
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
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
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
Oops, something went wrong.