Out of curiosity, how far have you studied American History?
I know for sure that what you said is true at an 8th grade American History class level, because when I was in 8th grade, I learned that Democrats were in the South and supported slavery.
It wasn't until college level American History that I learned that the political positions switched, and that was some time after Lincoln was assassinated, I believe during FDR's time. It heavily explains why the majority of the South, which formerly identified as Democrat, now identify as Republican, while the North, which formerly identified as Republican, now mainly identifies as Democrat.