-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Top Video and Last Notice fields
- Loading branch information
1 parent
66ad6c1
commit 3e54eb3
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
database/migrations/2020_02_29_130036_add_top_video_and_last_notice_to_videos_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class AddTopVideoAndLastNoticeToVideosTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('videos', function (Blueprint $table) { | ||
$table->boolean('top_video')->default(false)->after('review_status'); | ||
$table->dateTime('last_notification')->nullable()->after('top_video'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('videos', function (Blueprint $table) { | ||
$table->dropColumn(['top_video', 'last_notification']); | ||
}); | ||
} | ||
} |