You are right the Democratic party was full of racists.  Some powerful leaders were Jefferson Davis and Alexander Stephens.  Most all members of the Republican party were progressive and worked for civil rights, such as Presidents A. Lincoln and U. S. Grant.  By the time of FDR, many democrats were becoming uneasy with a growing wing inside the Democratic party that was progressive and advocated for civil rights.  This became more pronouced when President Truman ordered the Pentagon to integrate the armed forces.  By 1963/64/65, with LBJ ramming thru the Civil Rights and Voting Rights Acts, the leaders of the old racist  faction of the Democratic Party revolted.  These included Strom Thurmond, Richard Russell, Leander Perez, Jesse Helms, George Wallace, Lester Maddox, Orval Faubus, et. al.  By the election of 1968 a major political shift within the parties.  Nixon executed his "Southern Strategy" welcoming all of the reactionary Southerners in to the GOP. Democrats went with Humphrey.