summaryrefslogtreecommitdiff
path: root/database/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations')
-rw-r--r--database/migrations/2022_11_11_171513_add_table_anime_details.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/database/migrations/2022_11_11_171513_add_table_anime_details.php b/database/migrations/2022_11_11_171513_add_table_anime_details.php
new file mode 100644
index 0000000..02518ef
--- /dev/null
+++ b/database/migrations/2022_11_11_171513_add_table_anime_details.php
@@ -0,0 +1,38 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddTableAnimeDetails extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('anime_details', function (Blueprint $table) {
+ $table->bigIncrements('id');
+ $table->unsignedBigInteger('mal_id')->unique()->default('0');
+ $table->float('score_begin')->default(0)->nullable();
+ $table->float('score_today')->default(0)->nullable();
+ $table->integer('watching')->default(0)->nullable();
+ $table->integer('members')->default(0)->nullable();
+
+ $table->foreign('mal_id')->references('mal_id')->on('anime');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('anime_details');
+ }
+}