mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Flarum\Migrations\Migration;
|
||||
|
||||
class AddReportsReadTimeToUsersTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->schema->table('users', function (Blueprint $table) {
|
||||
$table->dateTime('reports_read_time')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->schema->drop('reports_read_time');
|
||||
}
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Flarum\Migrations\Migration;
|
||||
|
||||
class CreateReportsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->schema->create('reports', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('post_id')->unsigned();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->string('reporter')->nullable();
|
||||
$table->string('reason')->nullable();
|
||||
$table->string('reason_detail')->nullable();
|
||||
$table->dateTime('time');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->schema->drop('reports');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user