-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into main-develop-sync
- Loading branch information
Showing
62 changed files
with
2,916 additions
and
951 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
44 changes: 44 additions & 0 deletions
44
db/migrations/sdp-migrations/2025-02-07.0-receiver-wallets-update-memo-type.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
-- This migration updates the receiver_wallets, circle_recipients and organizations tables to support the memo use cases. | ||
-- +migrate Up | ||
|
||
-- +migrate StatementBegin | ||
DO $$ BEGIN | ||
CREATE TYPE memo_type AS ENUM ( | ||
'text', | ||
'id', | ||
'hash', | ||
'return' | ||
); | ||
EXCEPTION | ||
WHEN duplicate_object THEN null; | ||
END $$; | ||
-- +migrate StatementEnd | ||
|
||
ALTER TABLE receiver_wallets | ||
ALTER COLUMN stellar_memo_type TYPE memo_type | ||
USING CASE | ||
WHEN stellar_memo_type IN ('text', 'id', 'hash', 'return') THEN stellar_memo_type::memo_type | ||
ELSE 'text'::memo_type | ||
END; | ||
|
||
ALTER TABLE circle_recipients | ||
ADD COLUMN stellar_address TEXT, | ||
ADD COLUMN stellar_memo TEXT; | ||
|
||
ALTER TABLE organizations | ||
ADD COLUMN is_memo_tracing_enabled BOOLEAN DEFAULT TRUE; | ||
|
||
|
||
-- +migrate Down | ||
|
||
ALTER TABLE organizations | ||
DROP COLUMN is_memo_tracing_enabled; | ||
|
||
ALTER TABLE circle_recipients | ||
DROP COLUMN stellar_address, | ||
DROP COLUMN stellar_memo; | ||
|
||
ALTER TABLE receiver_wallets | ||
ALTER COLUMN stellar_memo_type TYPE TEXT USING stellar_memo_type::text; | ||
|
||
DROP TYPE IF EXISTS memo_type; |
28 changes: 28 additions & 0 deletions
28
db/migrations/tss-migrations/2025-01-07.0-add-memo-columns.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- This migration adds the memo and memo_type (with custom type) columns to the submitter_transactions table. | ||
-- +migrate Up | ||
|
||
-- +migrate StatementBegin | ||
DO $$ BEGIN | ||
CREATE TYPE memo_type AS ENUM ( | ||
'text', | ||
'id', | ||
'hash', | ||
'return' | ||
); | ||
EXCEPTION | ||
WHEN duplicate_object THEN null; | ||
END $$; | ||
-- +migrate StatementEnd | ||
|
||
ALTER TABLE submitter_transactions | ||
ADD COLUMN memo TEXT, | ||
ADD COLUMN memo_type memo_type; | ||
|
||
-- +migrate Down | ||
|
||
|
||
ALTER TABLE submitter_transactions | ||
DROP COLUMN memo, | ||
DROP COLUMN memo_type; | ||
|
||
DROP TYPE IF EXISTS memo_type; |
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.