Skip to content

Commit

Permalink
add unique constraints to miner and reward table
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriptikz committed Oct 7, 2024
1 parent 05bd94f commit 16aaa35
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions migrations/2024-10-06-185750_miner_pubkey_unique/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE miners DROP INDEX uc_miner_pubkey
1 change: 1 addition & 0 deletions migrations/2024-10-06-185750_miner_pubkey_unique/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE miners ADD CONSTRAINT uc_miner_pubkey UNIQUE (pubkey)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE rewards DROP INDEX uc_reward_miner_id
1 change: 1 addition & 0 deletions migrations/2024-10-06-190014_reward_miner_id_unique/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE rewards ADD CONSTRAINT uc_reward_miner_id UNIQUE (miner_id)

0 comments on commit 16aaa35

Please sign in to comment.