added migrations for relation table and fixed formatting