There are a lot of pitfalls in migrations, for instance, if the migrations folder is not in sync with the alembic_version table in the database, errors will happen. Also, if a database migration goes wrong, documentation for a rollback should be provided.