Laws were on the books long before the rebellion forbidding blacks from getting an education, forbidding free blacks to work in certain professions, forbidding free blacks from living in certain areas, forbidding free blacks from moving into the state, and often forbidding slaves from being emancipated without an act of the state legislature. Didn't you know that?
Laws requiring segregation and laws specifically designed to make it impossible for free Blacks to earn a living.....as well as social practices supporting the same ie Whites refusing to work alongside Blacks, was a Northern thing, not a Southern practice. De Tocqueville commented on it several times.