added key property to patient model and improved migrator script