summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorus2022-11-11 20:16:17 +0100
committerhorus2022-11-11 20:16:17 +0100
commit01087677544210e40b57c98a425f8f477fe64ac3 (patch)
tree23a7969be85a3d0388f64ab370679d06ed4a4b0c
parente16ad90b47ef0b734fd49c5720b61424a9073e9f (diff)
downloadsenpai-01087677544210e40b57c98a425f8f477fe64ac3.tar.gz
new migration anime_details
-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');
+ }
+}