Move database to the api.