updates
This commit is contained in:
@@ -14,6 +14,9 @@ return new class extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
DB::table('media')->whereNull('mime')->update(['mime' => '']);
|
||||
DB::table('media')->whereNull('permission')->update(['permission' => '']);
|
||||
|
||||
Schema::table('media', function (Blueprint $table) {
|
||||
$table->string('storage')->default("cdn");
|
||||
$table->string('description')->default("");
|
||||
@@ -21,18 +24,11 @@ return new class extends Migration
|
||||
$table->string('dimensions')->default("");
|
||||
$table->text('variants');
|
||||
|
||||
// Update null 'mime' values to empty strings
|
||||
DB::table('media')->whereNull('mime')->update(['mime' => '']);
|
||||
|
||||
// // Update null 'permission' values to empty strings
|
||||
DB::table('media')->whereNull('permission')->update(['permission' => '']);
|
||||
|
||||
$table->bigInteger('size')->default(0)->change();
|
||||
$table->string('permission')->default("")->nullable(false)->change();
|
||||
|
||||
$table->string('mime')->default("")->nullable(false)->change();
|
||||
// $table->renameColumn('mime', 'mime_type');
|
||||
$table->string('mime_type');
|
||||
$table->renameColumn('mime', 'mime_type');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user