-
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.
funds-manager: migrations: Add
hot_wallets
table
- Loading branch information
Showing
5 changed files
with
37 additions
and
10 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
3 changes: 3 additions & 0 deletions
3
funds-manager/migrations/2024-07-27-200942_create_hot_wallets_table/down.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,3 @@ | ||
-- Drop the hot wallets table | ||
DROP TABLE hot_wallets; | ||
ALTER TABLE renegade_wallets RENAME TO wallets; |
9 changes: 9 additions & 0 deletions
9
funds-manager/migrations/2024-07-27-200942_create_hot_wallets_table/up.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,9 @@ | ||
-- Create a table for storing hot wallets | ||
CREATE TABLE hot_wallets( | ||
id UUID PRIMARY KEY, | ||
secret_id TEXT NOT NULL, -- The AWS Secrets Manager secret that holds the hot wallet's key | ||
vault TEXT NOT NULL -- The fireblocks vault that the hot wallet writes back to | ||
); | ||
|
||
--- Rename the wallets table to renegade_wallets for clarity | ||
ALTER TABLE wallets RENAME TO renegade_wallets; |