-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db migration file create_stake_accounts
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE stake_accounts |
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,12 @@ | ||
CREATE TABLE stake_accounts ( | ||
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
pool_id INT NOT NULL, | ||
mint_pubkey VARCHAR(44) NOT NULL, | ||
staker_pubkey VARCHAR(44) NOT NULL, | ||
stake_pda VARCHAR(44) NOT NULL, | ||
rewards_balance BIGINT UNSIGNED DEFAULT 0 NOT NULL, | ||
staked_balance BIGINT UNSIGNED DEFAULT 0 NOT NULL, | ||
total_rewards_earned BIGINT UNSIGNED DEFAULT 0 NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL | ||
) |