I want to migrate and alter table using such kind of phrase.
execute "ALTER TABLE `#{table}` CHANGE `#{column.name}` `#{column.name}` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
but while alter database , table will be locked . how can i migrate without down time.
rails5 supports such kind of work around?
(rails6 seems supporting advisory lock )
i am using mysql 5.7
You can tell MySQL to not lock the table during this operation, and also use the INPLACE algorithm.