Skip to content
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 #653

Merged
merged 6 commits into from
Nov 3, 2023

Conversation

rrd108
Copy link
Contributor

@rrd108 rrd108 commented Nov 3, 2023

This PR is intended to fix cakephp/phinx#2225

cleaned out for #645

@rrd108 rrd108 changed the title https://github.com/rrd108/migrations initial snapshot does not define collation info Nov 3, 2023
@rrd108 rrd108 marked this pull request as draft November 3, 2023 14:19
@rrd108 rrd108 marked this pull request as ready for review November 3, 2023 14:45
@dereuromark dereuromark merged commit fd820c9 into cakephp:4.x Nov 3, 2023
10 checks passed
@@ -201,6 +201,7 @@ public function down(): void
$this->table('articles')
->addColumn('content', 'text', [
'after' => 'rating',
'collation' => 'utf8_general_ci',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still unsure about all these collation occurrences. One problem we have here is that we can't define a collation for the test schema, so I guess all the comparison tables will be created with the current server defaults.

Maybe the collation in the .lock files should be adapted accordingly to the test environment default, which I guess is utf8mb4_0900_ai_ci, so that the "default collation has not changed" behavior can be observed and tested properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the CI the default collation is set to utf8mb4_general_ci.

sudo service mysql start mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE cakephp_test DEFAULT COLLATE=utf8mb4_general_ci;

So that is why I had to add this wherever the test has a different collation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

initial snapshot does not define collation info
3 participants