[obs-commits] [openSUSE/open-build-service] 20ac26: [frontend] Store comments.body as utf8mb4
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 20ac26e6aea24271a94586509d7467bffa3b1e41 https://github.com/openSUSE/open-build-service/commit/20ac26e6aea24271a94586... Author: Stephan Kulow <coolo@suse.de> Date: 2018-07-22 (Sun, 22 Jul 2018) Changed paths: M ReleaseNotes-2.10 M src/api/config/database.yml.example 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: 82dfbf064983041d1e415a6afe83b4676e4e3d7e https://github.com/openSUSE/open-build-service/commit/82dfbf064983041d1e415a... Author: Stephan Kulow <coolo@suse.de> Date: 2018-07-22 (Sun, 22 Jul 2018) Changed paths: M src/api/.rubocop.yml M src/api/db/migrate/20140624101042_add_package_tracking.rb M src/api/db/migrate/20140627071042_product_media_tracking.rb M src/api/db/migrate/20140709071042_product_medium_tracking.rb M src/api/db/migrate/20140717101042_add_updateinfo_tracking.rb M src/api/db/migrate/20140729101042_updateinfo_tracking_second_attempt.rb M src/api/db/migrate/20140801071042_product_version_tracking.rb M src/api/db/migrate/20140903125426_add_generic_operation_history.rb M src/api/db/migrate/20141110105426_fix_product_media_uniq_index.rb M src/api/db/migrate/20170306084558_change_repositories_remote_project_name_to_not_null.rb M src/api/db/migrate/20170619111734_alter_notifications_to_use_polymorphic.rb M src/api/db/migrate/20171218160607_create_ec2_configuration.rb Log Message: ----------- [db] Hardcode encoding in old migrations The old migrations are 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 On create it's easy to add, but renames and other column changes need to be changed to executes as they otherwise drop the charset Commit: accb1cd4ce7b3344272a609e07d3b7bf553d8cc1 https://github.com/openSUSE/open-build-service/commit/accb1cd4ce7b3344272a60... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2018-07-26 (Thu, 26 Jul 2018) Changed paths: M ReleaseNotes-2.10 M src/api/.rubocop.yml M src/api/config/database.yml.example M src/api/db/migrate/20140624101042_add_package_tracking.rb M src/api/db/migrate/20140627071042_product_media_tracking.rb M src/api/db/migrate/20140709071042_product_medium_tracking.rb M src/api/db/migrate/20140717101042_add_updateinfo_tracking.rb M src/api/db/migrate/20140729101042_updateinfo_tracking_second_attempt.rb M src/api/db/migrate/20140801071042_product_version_tracking.rb M src/api/db/migrate/20140903125426_add_generic_operation_history.rb M src/api/db/migrate/20141110105426_fix_product_media_uniq_index.rb M src/api/db/migrate/20170306084558_change_repositories_remote_project_name_to_not_null.rb M src/api/db/migrate/20170619111734_alter_notifications_to_use_polymorphic.rb M src/api/db/migrate/20171218160607_create_ec2_configuration.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: ----------- Merge pull request #5419 from coolo/fix_3547 [frontend] Store comments.body as utf8mb4 Compare: https://github.com/openSUSE/open-build-service/compare/bd11b000aeaa...accb1c... **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)
-
Henne Vogelsang