fix migration rename column issues

This commit is contained in:
2023-04-21 09:58:05 +10:00
parent 2534d4c159
commit 68d59eda69
2 changed files with 5 additions and 2 deletions

View File

@@ -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),
];
}
}

View File

@@ -28,6 +28,9 @@ return new class extends Migration
$table->string('permission')->default("")->nullable(false)->change();
$table->string('mime')->default("")->nullable(false)->change();
});
Schema::table('media', function(Blueprint $table) {
$table->renameColumn('mime', 'mime_type');
});
}