summaryrefslogtreecommitdiff
path: root/database/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations')
-rw-r--r--database/migrations/2020_09_17_193457_add_season_to_anime.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/database/migrations/2020_09_17_193457_add_season_to_anime.php b/database/migrations/2020_09_17_193457_add_season_to_anime.php
new file mode 100644
index 0000000..deb2114
--- /dev/null
+++ b/database/migrations/2020_09_17_193457_add_season_to_anime.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddSeasonToAnime extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('anime', function (Blueprint $table) {
+ $table->string('season_name')->nullable()->default('');
+ $table->integer('season_year')->nullable()->default(DB::raw( 'YEAR(CURDATE())' ));
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('anime', function (Blueprint $table) {
+ //
+ });
+ }
+}