API in migrations