Is there any way to verify SQL to be executed for a migration before it is actually executed? Looking at Ecto.Migrate Task documentation --log-sql
dumps the SQL that was executed for the migration, but I see no way to actually do a dry-run and dump the SQL that would be executed in order to manually verify the changes before the actual execution.
The reasoning for this would be to be able to dry-run the migration in the deployment pipeline, with a manual verification step for the SQL to be executed form the DBA before actually applying any changes and deploying the application. Something similar to what Doctrine’s --dry-run
option provides.