1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

#47 - Adds functionality to delete a comment. Also reduces the number of watchers.

This commit is contained in:
Abijeet
2017-06-04 18:52:44 +05:30
parent 2fd421b115
commit 9558f84b97
6 changed files with 147 additions and 15 deletions

View File

@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CommentsAddActiveCol extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('comments', function (Blueprint $table) {
// add column active
$table->boolean('active')->default(true);
$table->dropIndex('comments_page_id_parent_id_index');
$table->index(['page_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('comments', function (Blueprint $table) {
// reversing the schema
$table->dropIndex('comments_page_id_index');
$table->dropColumn('active');
$table->index(['page_id', 'parent_id']);
});
}
}