20180103212743_json_user_metadata.up.sql 550 B

12345678
  1. ALTER TABLE `{{ index .Options "Namespace" }}users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  2. UPDATE `{{ index .Options "Namespace" }}users` SET `raw_app_meta_data` = '{}' WHERE `raw_app_meta_data` = '';
  3. UPDATE `{{ index .Options "Namespace" }}users` SET `raw_user_meta_data` = '{}' WHERE `raw_user_meta_data` = '';
  4. ALTER TABLE `{{ index .Options "Namespace" }}users`
  5. CHANGE COLUMN `raw_app_meta_data` `raw_app_meta_data` JSON NULL DEFAULT NULL ,
  6. CHANGE COLUMN `raw_user_meta_data` `raw_user_meta_data` JSON NULL DEFAULT NULL ;