diff --git a/database/migrations/2024_02_18_105804_change_charset_to_utf8mb4.php b/database/migrations/2024_02_18_105804_change_charset_to_utf8mb4.php new file mode 100644 index 000000000..6a265fa80 --- /dev/null +++ b/database/migrations/2024_02_18_105804_change_charset_to_utf8mb4.php @@ -0,0 +1,44 @@ +getTablePrefix(); + $tables = [ + "approve_execution", + "approve_execution_history", + "approve_identitylink", + "approve_identitylink_history", + "approve_proc_inst", + "approve_proc_inst_history", + "approve_proc_msgs", + "approve_procdef", + "approve_procdef_history", + "approve_task", + "approve_task_history" + ]; + foreach ($tables as $table) { + if (Schema::hasTable($table)) { + Schema::getConnection()->getPdo()->exec("ALTER TABLE `{$pre}{$table}` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"); + } + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +}