fixes db and migrations