Installs Device and migrates the database