diff --git a/pkg/piecestore/rpc/server/psdb/psdb.go b/pkg/piecestore/rpc/server/psdb/psdb.go index a27c13c43..1b3cfef33 100644 --- a/pkg/piecestore/rpc/server/psdb/psdb.go +++ b/pkg/piecestore/rpc/server/psdb/psdb.go @@ -74,7 +74,7 @@ func Open(ctx context.Context, DataPath, DBPath string) (db *DB, err error) { return nil, err } - _, err = tx.Exec("CREATE INDEX idx_ttl_expires ON ttl (expires);") + _, err = tx.Exec("CREATE INDEX IF NOT EXISTS idx_ttl_expires ON ttl (expires);") if err != nil { return nil, err }