1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Initial commit

This commit is contained in:
Toby Zerner
2015-09-04 13:26:51 +09:30
commit cb6347ef6a
44 changed files with 1633 additions and 0 deletions

View File

@@ -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');
}
}

View File

@@ -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');
}
}