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

[APPINT-1146] Fix database encoding configuration #181

Merged
merged 2 commits into from
Nov 6, 2018

Conversation

ouranos
Copy link
Contributor

@ouranos ouranos commented Nov 2, 2018

Sometimes the database is created with an character set different that
the one specified in config/database.yml.
This causes some issue when the database is created in non utf8 charset
(eg: latin1).

This commit adds an initializer that warn the user in case of mismatch
between the configured and actual encoding.
It also provides a migration generator to facilitate charset migration.

@ouranos
Copy link
Contributor Author

ouranos commented Nov 2, 2018

Here's how it looks like:
image

Copy link
Contributor

@hhemanth hhemanth left a comment

Choose a reason for hiding this comment

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

Looks good

Sometimes the database is created with an character set different that
the one specified in `config/database.yml`.
This causes some issue when the database is created in non utf8 charset
(eg: latin1).

This commit adds an initializer that warn the user in case of mismatch
between the configured and actual encoding.
It also provides a migration generator to facilitate charset migration.
@ouranos ouranos requested a review from a team November 2, 2018 05:23
Copy link

@alexmaestrano alexmaestrano left a comment

Choose a reason for hiding this comment

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

LGTM. After this is merged, do we have to take any action on other connectors? Say connector-gusto, for example? 🤓

@ouranos
Copy link
Contributor Author

ouranos commented Nov 2, 2018

@alexmaestrano Yes we'll have to update the gem and then use the generator to create the migration.
It's only a problem when the db was created with a different charset than utf8 though.

Copy link
Contributor

@cesar-tonnoir cesar-tonnoir left a comment

Choose a reason for hiding this comment

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

well done

@ouranos ouranos merged commit fb522ca into maestrano:master Nov 6, 2018
@ouranos ouranos deleted the feature/fix-db-encoding branch November 6, 2018 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants