summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorhorus2020-09-17 23:37:00 +0200
committerhorus2020-09-17 23:37:00 +0200
commit0c521f4907ee74cda8d4b6810a5ccb21c175f857 (patch)
tree4c334a83f6281d0f23deb35077157811eae3ab16 /database
parent0e3b6263b4756ad93bb619ec34b7b121b87a097f (diff)
downloadsenpai-0c521f4907ee74cda8d4b6810a5ccb21c175f857.tar.gz
add season to anime model
Diffstat (limited to 'database')
-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) {
+ //
+ });
+ }
+}