Skip to content

Commit

Permalink
db migration file create_stake_accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriptikz committed Oct 19, 2024
1 parent d04bac1 commit 63736d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE stake_accounts
12 changes: 12 additions & 0 deletions migrations/2024-10-18-203518_create_stake_accounts/up.sql
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
)

0 comments on commit 63736d7

Please sign in to comment.