The lineups for the second round of Democratic presidential debates were released Thursday night, with Sens. Elizabeth Warren of Massachusetts and Bernie Sanders of Vermont appearing on the first night and former Vice President Joe Biden and California Sen. Kamala Harris, who butted heads in the last debate, facing off on the second night.

The lineups were determined in three random drawings on CNN, which is hosting the Democrats' 2020 Detroit debate. The debate features 20 candidates and will be held over two nights — Tuesday July 30th and Wednesday July 31st.

Night one will include:

Sen. Bernie Sanders of Vermont

Sen. Elizabeth Warren of Massachusetts

Mayor Pete Buttigieg of South Bend, Indiana

Beto O'Rourke, former Texas congressman

Sen. Amy Klobuchar of Minnesota

Gov. Steve Bullock of Montana

Rep. Tim Ryan of Ohio

John Hickenlooper, former Colorado governor

John Delaney, former Maryland congressman

Marianne Williamson, author

CNN also revealed the order the candidates would be standing in — Williamson, Ryan, Klobuchar, Buttigieg, Sanders, Warren, O'Rourke, Hickenlooper, Delaney and Bullock.

At a campaign event Thursday night in Sioux City, Iowa, Warren said she was excited to share the stage with Sanders.

"Bernie and I have been friends for a long long time," she said.

Night two will include:

Joe Biden, former vice president

Sen. Kamala Harris of California

Sen. Cory Booker of New Jersey

Julián Castro, former HUD secretary

Andrew Yang, entrepreneur

Mayor Bill de Blasio of New York City

Sen. Michael Bennet of Colorado

Rep. Tulsi Gabbard of Hawaii

Sen. Kirsten Gillibrand of New York

Gov. Jay Inslee of Washington

While Harris and Biden had Sanders standing between them in the first debate, they'll be side-by-side this time around. The order for night two is Bennet, Gillibrand, Castro, Booker, Biden, Harris, Yang, Gabbard, Inslee and de Blasio.

Yang was holding a town hall in Des Moines, Iowa when he learned he’d be back on stage with Biden and Harris.

“Oh, the two best friends from last time,” he said.

The candidate nights were chosen in three different random drawings based on their poll standings.

The criteria to make the debate stage in Detroit was the same as the first debate last month in Miami. Candidates could qualify by getting support from at least 1 percent of voters in at least three national polls or early state polls, or by raising money from 65,000 unique donors. Most qualified by meeting both criteria, but Bennet, Bullock, de Blasio, Delaney, Hickenlooper and Ryan qualified through polling only.

Overall the lineup is almost identical to the Miami debate, which was hosted over two nights by NBC News, MSNBC and Telemundo. There is one substitution — Rep. Eric Swalwell of California dropped out of the race after the debate, effectively passing the torch to Bullock, who snared his vacated spot.

In Miami, the first night was headlined by Warren, Booker, O'Rourke and Castro. The second night featured Biden, Sanders, Harris and Buttigieg and drew a record audience.

The benchmarks will change for the third debate on Sept. 12 and potentially a second night on Sept. 13, which will be hosted in Houston by ABC and Univision. To take part in that debate, candidates will have to show they've received donations from 130,000 different donors, including at least 400 from 20 different states. They'll also have to hit at least 2 percent in four different qualifying polls.