[obs-commits] [openSUSE/open-build-service] b6059e: [frontend] Store comments.body as utf8mb4
Branch: refs/heads/revert-5491-revert-5419-fix_3547 Home: https://github.com/openSUSE/open-build-service Commit: b6059e284a79166d12f2a73de3ee46055627300a https://github.com/openSUSE/open-build-service/commit/b6059e284a79166d12f2a7... Author: Stephan Kulow <coolo@suse.de> Date: 2018-07-26 (Thu, 26 Jul 2018) Changed paths: M ReleaseNotes-2.10 M src/api/config/database.yml.example A src/api/config/initializers/mysql_utf8mb4.rb A src/api/db/migrate/20180720082742_switch_to_utf8mb4.rb M src/api/db/structure.sql M src/api/script/api_test_in_spec.sh M src/api/spec/models/comment_spec.rb Log Message: ----------- [frontend] Store comments.body as utf8mb4 Allows emojis and fixes #3547 This charset change requires mysql 5.5, which was released 2012 but is still not the default. See more details about the problem on https://railsmachine.com/articles/2017/05/19/converting-a-rails-database-to-... I borrowed the migration from there - but limited it to comments, the charset is backward compatible, but requires changes to database.yml in production (to store emojis not to apply the migration) Commit: 841230217109faaac48da3276b289194053d7b4e https://github.com/openSUSE/open-build-service/commit/841230217109faaac48da3... Author: Stephan Kulow <coolo@suse.de> Date: 2018-07-26 (Thu, 26 Jul 2018) Changed paths: M src/api/db/migrate/20170306084558_change_repositories_remote_project_name_to_not_null.rb Log Message: ----------- [db] Hardcode encoding in old migration The change_repositories_remote_project_name_to_not_null migration is tested on current database and database settings. This makes it bound to the current encoding - and that is utf8mb4. But without Barracuda tables you can't have varchars. So hardcode the encoding used in 2017 by using execute instead of rails helpers Compare: https://github.com/openSUSE/open-build-service/compare/7a3c239a81d2...841230... **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
participants (1)
-
Stephan Kulow