X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=database%2Fmigrations%2F2022_08_21_130547_create_technique_chapter_table.php;fp=database%2Fmigrations%2F2022_08_21_130547_create_technique_chapter_table.php;h=339ac771152916aa4aab9e96f1b0326860136ceb;hb=7e8555cfc96dcd364ca4fe9895e51af1bb04b546;hp=0000000000000000000000000000000000000000;hpb=4ac9a5a331949fcec42378ddc495385ae8628a79;p=alttp.git diff --git a/database/migrations/2022_08_21_130547_create_technique_chapter_table.php b/database/migrations/2022_08_21_130547_create_technique_chapter_table.php new file mode 100644 index 0000000..339ac77 --- /dev/null +++ b/database/migrations/2022_08_21_130547_create_technique_chapter_table.php @@ -0,0 +1,38 @@ +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'); + } +};