Skip to content

Commit abd50e6

Browse files
authored
Merge pull request #4427 from HDInnovations/History
2 parents dbade37 + 7fcd4d0 commit abd50e6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Diff for: app/Models/History.php

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Illuminate\Database\Eloquent\Factories\HasFactory;
2020
use Illuminate\Database\Eloquent\Model;
2121
use DateTimeInterface;
22+
use Illuminate\Database\Eloquent\SoftDeletes;
2223

2324
/**
2425
* App\Models\History.
@@ -44,6 +45,7 @@ class History extends Model
4445
{
4546
/** @use HasFactory<\Database\Factories\HistoryFactory> */
4647
use HasFactory;
48+
use SoftDeletes;
4749

4850
/**
4951
* The Database Table Used By The Model.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Illuminate\Database\Migrations\Migration;
6+
use Illuminate\Database\Schema\Blueprint;
7+
use Illuminate\Support\Facades\Schema;
8+
9+
return new class () extends Migration {
10+
public function up(): void
11+
{
12+
Schema::table('history', function (Blueprint $table): void {
13+
$table->softDeletes()->after('updated_at');
14+
});
15+
}
16+
};

0 commit comments

Comments
 (0)