Add (migration) change cliff hanger from string to text

This commit is contained in:
2023-08-24 17:03:30 +08:00
parent e9a12d3f3d
commit ef58f62e57

View File

@@ -0,0 +1,28 @@
<?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()
{
Schema::table('posts', function (Blueprint $table) {
$table->text('cliffhanger')->after('excerpt')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::table('posts', function (Blueprint $table) {
$table->string('cliffhanger')->after('excerpt')->nullable()->change();
});
}
};