Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@straub
Copy link
Contributor

@straub straub commented Jun 20, 2018

Ran into an issue today where .renameColumn() was failing because the columns had a different collation after the rename and recreating the foreign keys caused an error. The collation was being lost during the alter change. This change preserves the collation through the alter.

I'm not familiar enough with the knex test suite to know how to go about adding an integration test for this. If someone can provide some pointers, I'd appreciate it. Didn't want to let that stop me raising the issue and providing this patch.

Thanks!

Copy link
Member

@elhigu elhigu left a comment

Choose a reason for hiding this comment

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

Needs integration tests, which verifies that renaming works correctly and collation is really preserved.

# Conflicts:
#	src/dialects/mysql/schema/tablecompiler.js
#	test/integration/builder/additional.js
@kibertoad kibertoad merged commit 81d6ffa into knex:master Feb 1, 2022
@kibertoad
Copy link
Collaborator

Released in 1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants