diff options
| author | horus | 2020-09-17 23:37:00 +0200 |
|---|---|---|
| committer | horus | 2020-09-17 23:37:00 +0200 |
| commit | 0c521f4907ee74cda8d4b6810a5ccb21c175f857 (patch) | |
| tree | 4c334a83f6281d0f23deb35077157811eae3ab16 /database | |
| parent | 0e3b6263b4756ad93bb619ec34b7b121b87a097f (diff) | |
| download | senpai-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.php | 33 |
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) { + // + }); + } +} |
