Democrats in the 1860s are not the same democrats now. the ideology has completely changed over the past 150 years believe it or not. Democrats in the 1860s were trying to keep policies and laws about slavery the way they had always been, obviously a more conservative view of thinking. Republicans were the ones trying to abolish slavery, create change, obviously a more liberal view of thinking. The titles have basically changed so while yes, Democrats were the ones trying to uphold slavery, they are more equated to the Republican conservatives of today