Fix enum migration 3 saveQuietly (without events)
This commit is contained in:
parent
fe252fa0ff
commit
c5800cc1dc
1 changed files with 20 additions and 19 deletions
|
|
@ -15,29 +15,30 @@ class UpdateTicketsStatusWithEnumStatus3 extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
foreach (Ticket::where('status', 2)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::inprogress();
|
||||
$ticket->save();
|
||||
}
|
||||
foreach (Ticket::where('status', 3)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::waiting();
|
||||
$ticket->save();
|
||||
}
|
||||
foreach (Ticket::where('status', 4)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::processed();
|
||||
$ticket->save();
|
||||
}
|
||||
foreach (Ticket::where('status', 5)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::recette();
|
||||
$ticket->save();
|
||||
//save saveQuietly (without events)
|
||||
foreach (Ticket::where('status', 9)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::archived();
|
||||
$ticket->saveQuietly();
|
||||
}
|
||||
foreach (Ticket::where('status', 6)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::production();
|
||||
$ticket->save();
|
||||
$ticket->saveQuietly();
|
||||
}
|
||||
foreach (Ticket::where('status', 9)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::archived();
|
||||
$ticket->save();
|
||||
foreach (Ticket::where('status', 5)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::recette();
|
||||
$ticket->saveQuietly();
|
||||
}
|
||||
foreach (Ticket::where('status', 4)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::processed();
|
||||
$ticket->saveQuietly();
|
||||
}
|
||||
foreach (Ticket::where('status', 3)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::waiting();
|
||||
$ticket->saveQuietly();
|
||||
}
|
||||
foreach (Ticket::where('status', 2)->get() as $ticket) {
|
||||
$ticket->status = TicketStatus::inprogress();
|
||||
$ticket->saveQuietly();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue