Restructered migrations and added migrations for pivot tables