From 1c396d1fdfb9de10e6cb526c4888687973d36773 Mon Sep 17 00:00:00 2001 From: Alex Runyan Date: Thu, 21 Dec 2023 14:47:32 -0500 Subject: [PATCH] Added migration to convert status column from enum to varchar --- ...104245_check_fix_status_at_users_table.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2023_12_18_104245_check_fix_status_at_users_table.php diff --git a/database/migrations/2023_12_18_104245_check_fix_status_at_users_table.php b/database/migrations/2023_12_18_104245_check_fix_status_at_users_table.php new file mode 100644 index 0000000000..da37de0ed6 --- /dev/null +++ b/database/migrations/2023_12_18_104245_check_fix_status_at_users_table.php @@ -0,0 +1,32 @@ +Type, 0, 4) === 'enum'; + if (!$isEnum) { + return; + } + // change the column status to varchar + DB::statement('ALTER TABLE users MODIFY COLUMN status VARCHAR(255) NOT NULL DEFAULT "ACTIVE"'); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + } +};