File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ use Illuminate \Database \Migrations \Migration ;
5+ use Illuminate \Database \Schema \Blueprint ;
6+ use Illuminate \Support \Facades \Schema ;
7+
8+ return new class extends Migration
9+ {
10+ /**
11+ * Run the migrations.
12+ */
13+ public function up (): void
14+ {
15+ Schema::table ('media ' , function (Blueprint $ table ) {
16+ $ table ->uuid ('id ' )->change ();
17+ });
18+ }
19+
20+ /**
21+ * Reverse the migrations.
22+ */
23+ public function down (): void
24+ {
25+ Schema::table ('media ' , function (Blueprint $ table ) {
26+ $ table ->unsignedBigInteger ('id ' )->change ();
27+ });
28+ }
29+ };
Original file line number Diff line number Diff line change 55
66use Illuminate \Contracts \Filesystem \Filesystem ;
77use Illuminate \Database \Eloquent \Casts \Attribute ;
8+ use Illuminate \Database \Eloquent \Concerns \HasUuids ;
89use Illuminate \Database \Eloquent \Factories \HasFactory ;
910use Illuminate \Database \Eloquent \Model ;
1011use Illuminate \Database \Eloquent \Relations \MorphTo ;
1112use Illuminate \Support \Facades \Storage ;
1213use Imahmood \FileStorage \Database \Factories \MediaFactory ;
1314
1415/**
15- * @property int $id
16+ * @property string $id
1617 * @property string $disk
1718 * @property string|null $model_type
1819 * @property int|null $model_id
3839 */
3940class Media extends Model
4041{
41- use HasFactory;
42+ use HasFactory, HasUuids ;
4243
4344 /**
4445 * {@inheritDoc}
You can’t perform that action at this time.
0 commit comments