mirror of
https://github.com/flarum/core.git
synced 2025-08-09 01:46:35 +02:00
Rename to Flags, tweak flag controls
- Display post "destructiveControls" in flag instead of custom buttons - Make flags more versatile/extensible - Delete associated flags when a post is deleted Uninstall the Reports extension before installing.
This commit is contained in:
@@ -8,22 +8,22 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Migrations\Reports;
|
||||
namespace Flarum\Migrations\Flags;
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Flarum\Migrations\Migration;
|
||||
|
||||
class AddReportsReadTimeToUsersTable extends Migration
|
||||
class AddFlagsReadTimeToUsersTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->schema->table('users', function (Blueprint $table) {
|
||||
$table->dateTime('reports_read_time')->nullable();
|
||||
$table->dateTime('flags_read_time')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->schema->drop('reports_read_time');
|
||||
$this->schema->drop('flags_read_time');
|
||||
}
|
||||
}
|
@@ -8,20 +8,20 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Migrations\Reports;
|
||||
namespace Flarum\Migrations\Flags;
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Flarum\Migrations\Migration;
|
||||
|
||||
class CreateReportsTable extends Migration
|
||||
class CreateFlagsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->schema->create('reports', function (Blueprint $table) {
|
||||
$this->schema->create('flags', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('post_id')->unsigned();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->string('reporter')->nullable();
|
||||
$table->string('type');
|
||||
$table->integer('user_id')->unsigned()->nullable();
|
||||
$table->string('reason')->nullable();
|
||||
$table->string('reason_detail')->nullable();
|
||||
$table->dateTime('time');
|
||||
@@ -30,6 +30,6 @@ class CreateReportsTable extends Migration
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->schema->drop('reports');
|
||||
$this->schema->drop('flags');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user