Draft of DB and DB migration logic