3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
7 return new class extends Migration
16 Schema::table('techniques', function (Blueprint $table) {
17 $table->string('name')->nullable()->default(null)->change();
19 Schema::create('technique_chapter', function (Blueprint $table) {
21 $table->foreignId('parent_id')->references('id')->on('techniques')->constrained();
22 $table->foreignId('child_id')->references('id')->on('techniques')->constrained();
23 $table->integer('level')->default(2);
24 $table->integer('order')->default(0);
30 * Reverse the migrations.
34 public function down()
36 Schema::dropIfExists('technique_chapter');