-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(db): change prover_block_list's index on public_key from non-uniq…
…ue to unique (#1294) Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
21 additions
and
4 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
17 changes: 17 additions & 0 deletions
17
database/migrate/migrations/00020_alter_publickey_unique_prover_block.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,17 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
|
||
DROP INDEX if exists idx_prover_block_list_on_public_key; | ||
|
||
CREATE UNIQUE INDEX if not exists uniq_prover_block_list_on_public_key ON prover_block_list(public_key) where deleted_at IS NULL; | ||
|
||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
|
||
CREATE INDEX if not exists idx_prover_block_list_on_public_key ON prover_block_list(public_key); | ||
|
||
DROP INDEX if exists uniq_prover_block_list_on_public_key; | ||
|
||
-- +goose StatementEnd |