Change file desc to text, since it can be larger than 255 chars

This commit is contained in:
Deon George 2023-12-13 13:13:57 +11:00
parent f6a6c13ca2
commit ba0d612889

View File

@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
DB::statement('ALTER TABLE files ALTER COLUMN "desc" TYPE text');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
DB::statement('ALTER TABLE files ALTER COLUMN "desc" TYPE varchar(255)');
}
};