forked from safe-global/safe-transaction-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'safe-global:master' into master
- Loading branch information
Showing
21 changed files
with
344 additions
and
99 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
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
32 changes: 32 additions & 0 deletions
32
safe_transaction_service/history/migrations/0073_safe_apps_links.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,32 @@ | ||
""" | ||
Migrate Safe Apps links from apps.gnosis-safe.io -> apps-portal.safe.global | ||
Generated by Django 4.2.1 on 2023-06-26 14:18 | ||
""" | ||
|
||
from django.db import migrations | ||
|
||
# No way to do this efficiently using Django's ORM, so using a raw SQL | ||
migrate_safe_apps_links_sql = """ | ||
UPDATE history_multisigtransaction | ||
SET origin = replace(origin::text, 'https://apps.gnosis-safe.io', 'https://apps-portal.safe.global')::jsonb | ||
WHERE origin->>'url' LIKE 'https://apps.gnosis-safe.io%' | ||
""" | ||
|
||
reverse_migrate_safe_apps_links_sql = """ | ||
UPDATE history_multisigtransaction | ||
SET origin = replace(origin::text, 'https://apps-portal.safe.global', 'https://apps.gnosis-safe.io')::jsonb | ||
WHERE origin->>'url' LIKE 'https://apps-portal.safe.global%' | ||
""" | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("history", "0072_safecontract_banned_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
migrate_safe_apps_links_sql, reverse_sql=reverse_migrate_safe_apps_links_sql | ||
) | ||
] |
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.