Skip to content

Commit

Permalink
Add support for old migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Jul 12, 2024
1 parent abe8e01 commit 8779026
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions gnosis/eth/django/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,47 @@ def formfield(self, **kwargs):
}
defaults.update(kwargs)
return super().formfield(**defaults)


# --------- DEPRECATED, only for old migrations ----------------------
class EthereumAddressField(models.CharField):
system_check_removed_details = {
"msg": (
"EthereumAddressField has been removed except for support in "
"historical migrations."
),
"hint": "Use EthereumAddressFastBinaryField instead.",
"id": "fields.E4815", # pick a unique ID for your field.
}


class EthereumAddressV2Field(EthereumAddressBinaryField):
system_check_removed_details = {
"msg": (
"EthereumAddressField has been removed except for support in "
"historical migrations."
),
"hint": "Use EthereumAddressFastBinaryField instead.",
"id": "fields.E4815", # pick a unique ID for your field.
}


class Sha3HashField(models.CharField):
system_check_removed_details = {
"msg": (
"Sha3HashField has been removed except for support in "
"historical migrations."
),
"hint": "Use Keccak256Field instead.",
"id": "fields.E4817", # pick a unique ID for your field.
}


class HexField(models.CharField):
system_check_removed_details = {
"msg": (
"HexField has been removed except for support in " "historical migrations."
),
"hint": "Use HexV2Field instead.",
"id": "fields.E4818", # pick a unique ID for your field.
}

0 comments on commit 8779026

Please sign in to comment.