diff --git a/database/migrations/2023_04_06_101917_change_tickets_status.php b/database/migrations/2023_04_06_101917_change_tickets_status.php new file mode 100644 index 0000000..d3a685d --- /dev/null +++ b/database/migrations/2023_04_06_101917_change_tickets_status.php @@ -0,0 +1,53 @@ +get(); + collect($tickets)->map(function (object $ticket) { + switch ($ticket->status) { + case 3: + DB::table('tickets')->where('id', $ticket->id) + ->update(['status' => 18]); + break; + case 4: + DB::table('tickets')->where('id', $ticket->id) + ->update(['status' => 18]); + break; + case 5: + DB::table('tickets')->where('id', $ticket->id) + ->update(['status' => 18]); + break; + case 7: + DB::table('tickets')->where('id', $ticket->id) + ->update(['status' => 18]); + break; + case 10: + DB::table('tickets')->where('id', $ticket->id) + ->update(['status' => 13]); + break; + default: + break; + } //end switch + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}