--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('techniques', function (Blueprint $table) {
+ $table->string('name')->nullable()->default(null)->change();
+ });
+ Schema::create('technique_chapter', function (Blueprint $table) {
+ $table->id();
+ $table->foreignId('parent_id')->references('id')->on('techniques')->constrained();
+ $table->foreignId('child_id')->references('id')->on('techniques')->constrained();
+ $table->integer('level')->default(2);
+ $table->integer('order')->default(0);
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('technique_chapter');
+ }
+};