fixed all the naming issues (I think) in migrations and model; added all migration table rules.