fix migration rename column issues
This commit is contained in:
@@ -22,7 +22,7 @@ class MediaFactory extends Factory
|
||||
'name' => storage_path('app/public/') . $this->faker->slug() . '.' . $this->faker->fileExtension,
|
||||
'mime_type' => $this->faker->mimeType,
|
||||
'user_id' => $this->faker->uuid,
|
||||
'size' => $this->faker->numberBetween(1000, 1000000)
|
||||
'size' => $this->faker->numberBetween(1000, 1000000),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,10 @@ return new class extends Migration
|
||||
$table->bigInteger('size')->default(0)->change();
|
||||
$table->string('permission')->default("")->nullable(false)->change();
|
||||
|
||||
$table->string('mime')->default("")->nullable(false)->change();
|
||||
$table->string('mime')->default("")->nullable(false)->change();
|
||||
});
|
||||
|
||||
Schema::table('media', function(Blueprint $table) {
|
||||
$table->renameColumn('mime', 'mime_type');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user