1
0
mirror of https://github.com/flarum/core.git synced 2025-07-18 15:21:16 +02:00

Allow author to delete discussion if there are no replies

Also disallow the first post in a discussion to be deleted or hidden
(thus preventing discussions with zero posts)

closes flarum/core#90 closes flarum/core#92
This commit is contained in:
Toby Zerner
2015-06-23 10:34:33 +09:30
parent dfe1a9bae5
commit 3223f65ce3
8 changed files with 80 additions and 30 deletions

View File

@@ -15,16 +15,17 @@ class CreateDiscussionsTable extends Migration
public function up()
{
Schema::create('discussions', function (Blueprint $table) {
$table->increments('id');
$table->string('title', 200);
$table->integer('comments_count')->unsigned()->default(0);
$table->integer('participants_count')->unsigned()->default(0);
$table->integer('number_index')->unsigned()->default(0);
$table->dateTime('start_time');
$table->integer('start_user_id')->unsigned()->nullable();
$table->integer('start_post_id')->unsigned()->nullable();
$table->dateTime('last_time')->nullable();
$table->integer('last_user_id')->unsigned()->nullable();
$table->integer('last_post_id')->unsigned()->nullable();