-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial snapshot does not define collation info #645
Conversation
I see, I have to handle the case when the collation is the default. I will get back to it in a few days. |
Please compare against the full snapshot like the other snapshot tests do, ideally use The comparison file would be As can be seen from the failing tests, this would affect diffs too, so encoding defaults and changes would need to be properly tested there too. Might sound a bit pedantic, but when my recent work on Migrations taught me anything, then that its sloppy testing is one of its worst enemies, and a major source of pain when making changes. |
I still have to fix what @ndm2 suggested. |
Fix Phinx Feature Flags Link Syntax
Do I have to do anything more on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add the new snapshot to \Migrations\Test\TestCase\MigrationsTest::migrationsProvider()
.
So I just realized that I'll try to get that fixed somewhat quickly. |
added in 9052c29 |
Only the first snapshot was being tested, as subsequent calls to `migrate()` will not re-read the migration files from disk, but use cached instances from the first call.
4.x - Fix snapshot migration tests.
…issingSnapshotCollation
@ndm2 As I see tha failing tests coming from other test, not related to this one. |
I'm note sure what exactly you did, but it looks like rebasing somehow went wrong, all the changes here from existing commits should not be seen as new. The test failures might be a result of that. |
I do not know what did I do wrong. Anyway I would need some suggestion how to move forward. I cloned cakephp/migrations to my dev machine and executed So it seems that is the starting point for now. Re-adding my changes to this newly cloned repo does not change the number of errors, so I guess my additions are ok, but the checks will certainly fail. |
anyway it seems no error on the pipeline. |
I wonder if this could be squash merged |
This PR is intended to fix cakephp/phinx#2225
The added test case passes, so it seems to be fine for me.
However, thi is not a final version as I was not sure about 2 things.
Question 1
The current solution actually execute the
migration_snapshot
command and creates and writes a new migration file. My guess is that I could do it without creating the file, but I did not find out how.Question 2
The current test alters the
articles
table'stitle
field's collation. So I guess I have to alter it back to avoid affecting other tests. Do I have to do it, or the test system will drop the table after each tests?