You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 8, 2018. It is now read-only.
I also realized that any query no a prepared statement is executed even using the option --write-sql. Is this an expected behaviour of the postUp() method?
To prevent this I used the isMigrated method:
if ($this->version->isMigrated() !== true) echo'Not migrated yet. Exiting post-up.'; exit;
But I think alternatively you can use the *if (e.g. skipIf) methods which are not documented yet too.
At the moment there are no docs for the pre* and post* methods:
https://github.com/doctrine/migrations/blob/master/lib/Doctrine/DBAL/Migrations/AbstractMigration.php#L166-180
at
http://doctrine-migrations.readthedocs.org/en/latest/index.html
Though the
Schema
(by @beberlei) is injected into the method using it does not seem to have an effect as noticed by @neraath (and @ruippeixotog ?) in:http://stackoverflow.com/questions/5564945/remove-column-in-postup-method#6170121
An example use case:
https://gist.github.com/webdevilopers/0888dcc05b9d7f0f99ac
I also realized that any query no a prepared statement is executed even using the option
--write-sql
. Is this an expected behaviour of thepostUp()
method?To prevent this I used the
isMigrated
method:But I think alternatively you can use the *if (e.g.
skipIf
) methods which are not documented yet too.Possibly related in Symfony Bundle https://github.com/doctrine/DoctrineMigrationsBundle :
The text was updated successfully, but these errors were encountered: