the api and some migrations