diff --git a/database/migrations/2022_03_03_063237_change_over_due_status_to_sent.php b/database/migrations/2022_03_03_063237_change_over_due_status_to_sent.php new file mode 100644 index 00000000..f2d92bc3 --- /dev/null +++ b/database/migrations/2022_03_03_063237_change_over_due_status_to_sent.php @@ -0,0 +1,35 @@ +get(); + + if ($overdueInvoices) { + $overdueInvoices->map(function ($overdueInvoice) { + $overdueInvoice->status = Invoice::STATUS_SENT; + $overdueInvoice->overdue = true; + $overdueInvoice->save(); + }); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}