added migrations and database model