Closed SOHELAHMED7 closed 1 year ago
how is the order in the migration determined?
might need to add an explicit ordering by sorting the array by something useful.
I attempted to reproduce this issue by running this tests outside the container with the help of $ docker-compose run --rm php sh -c 'vendor/bin/phpunit'
I saw 3 failing tests. One of them signalled me to run make clean_all
and make up && make migrate
This fixed this issue.
The problem was stale migration was not removed from db.migration table.
Test: tests\unit\MultiDbSecondaryMigrationTest::testMysql
Github action fail: https://github.com/SOHELAHMED7/yii2-openapi/actions/runs/4253815431/jobs/7399197040
Locally
If I fix locally by copying content of
/app/tests/tmp/docker_app/migrations_mysql_db/m200000_000005_change_table_v2_comments.php
to/app/tests/specs/blog_v2/migrations_mysql_db/m200000_000005_change_table_v2_comments.php
then this test fails on Github actions.If I fix this test as per Github action, then Github CI passes but this tests fails locally.