1
0
Fork 0
forked from mirror/pixelfed

Add new migration

This commit is contained in:
Daniel Supernault 2019-03-31 13:23:41 -06:00
parent 8bc493e4a5
commit 9914c61c65
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRepliesCountToStatusesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('statuses', function (Blueprint $table) {
$table->unsignedInteger('reply_count')->nullable();
$table->boolean('comments_disabled')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('statuses', function (Blueprint $table) {
$table->dropColumn('reply_count');
$table->dropColumn('comments_disabled');
});
}
}