We are only allowing the addSql call and the schema modification to take effect in the up and down call.
This is necessary to ensure that the migration is revertable.
The schema is passed to the pre and post method only to be able to test the presence of some table, And the
connection that can get used trough it allow for the test of the presence of records.
public execute ( string $direction, boolean $dryRun = false, boolean $timeAllQueries = false ) : array | ||
$direction | string | The direction to execute the migration. |
$dryRun | boolean | Whether to not actually execute the migration SQL and just do a dry run. |
$timeAllQueries | boolean | Measuring or not the execution time of each SQL query. |
return | array | $sql |