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
Used version 2.x now after migration to 3.x I am found this problem.
I am using doctrine migration in my PHPUnit test suite.
On each setUp I am running running migration:
migrations:migrate
And then in each tearDown I have:
migrations:migrate first
In my migration up method I have some INSERT SQL queries.
In my down I have only DROP TABLE.
Q
A
BC Break
yes
Version
3.7.2
Summary
Basically executed queries shared between commands, if we reuse the "Application".
It's happens because migration objects kept in memory and $plannedSql is not clear between commands execution.
So migration executor appends new queries from down function to $plannedSql and then executes queries from prev up function call and later queries from down call.
Current behavior
On the doctrine:migrate first running in the tearDown the INSERT from the up method executed and after that the DROP TABLE exectued.
Bug Report
Used version 2.x now after migration to 3.x I am found this problem.
I am using doctrine migration in my PHPUnit test suite.
On each
setUp
I am running running migration:And then in each
tearDown
I have:In my migration
up
method I have someINSERT
SQL queries.In my
down
I have onlyDROP TABLE
.Summary
Basically executed queries shared between commands, if we reuse the "Application".
It's happens because migration objects kept in memory and $plannedSql is not clear between commands execution.
So migration executor appends new queries from
down
function to$plannedSql
and then executes queries from prevup
function call and later queries fromdown
call.Current behavior
On the
doctrine:migrate first
running in thetearDown
theINSERT
from theup
method executed and after that theDROP TABLE
exectued.How to reproduce
Expected behavior
No SQL quries from the first migrations executed on
migrations:migrate first
, onlyDROP TABLE
noINSERT
.The text was updated successfully, but these errors were encountered: