Celtic manager Brendan Rodgers has been given an awkward tie with Motherwell
Rangers were also drawn at home as they face Peterhead, while Aberdeen will travel to Ayr United, Hearts take on St Johnstone at McDiarmid Park and Hibernian will play Queen of the South at Easter Road.
The four teams all involved in European football - Celtic, Aberdeen, Hearts and Hibernian - plus group winners Rangers, Partick, Alloa and Morton are all seeded, while the other four group winners and four best runners-up from the group stages made up the rest of the draw.
The second-round ties are to be played on August 9, 10 and 11 and the full draw is:
We use your sign-up to provide content in ways you've consented to and to improve our understanding of you. This may include adverts from us and 3rd parties based on our understanding. You can unsubscribe at any time. Read our Privacy Policy