Skip to content

Commit

Permalink
Merge branch 'develop' into feat/add_chain_monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored Aug 28, 2023
2 parents 471af43 + e990e02 commit cde6981
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion database/migrate/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func testResetDB(t *testing.T) {
cur, err := Current(pgDB.DB)
assert.NoError(t, err)
// total number of tables.
assert.Equal(t, 9, int(cur))
assert.Equal(t, 10, int(cur))
}

func testMigrate(t *testing.T) {
Expand Down
19 changes: 19 additions & 0 deletions database/migrate/migrations/00010_add_index_chunk_prover_task.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- +goose Up
-- +goose StatementBegin

create index if not exists idx_chunk_hash on chunk(hash, deleted_at) where deleted_at IS NULL;

create index if not exists idx_proving_status_end_block_number_index on chunk(index, end_block_number, proving_status, deleted_at) where deleted_at IS NULL;

create index if not exists idx_publickey_proving_status on prover_task(prover_public_key, proving_status, deleted_at, id) where deleted_at is null;

-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin

drop index if exists idx_chunk_hash;
drop index if exists idx_proving_status_end_block_number_index;
drop index if exists idx_publickey_proving_status;

-- +goose StatementEnd

0 comments on commit cde6981

Please sign in to comment.