mirror of
https://github.com/flarum/core.git
synced 2025-08-01 14:10:37 +02:00
Implement notifications
This commit is contained in:
39
migrations/2015_02_24_000000_create_notifications_table.php
Normal file
39
migrations/2015_02_24_000000_create_notifications_table.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateNotificationsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->integer('sender_id')->unsigned()->nullable();
|
||||
$table->string('type');
|
||||
$table->string('subject_type')->nullable();
|
||||
$table->integer('subject_id')->unsigned()->nullable();
|
||||
$table->binary('data')->nullable();
|
||||
$table->dateTime('time');
|
||||
$table->boolean('is_read')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('notifications');
|
||||
}
|
||||
|
||||
}
|
@@ -26,6 +26,7 @@ class CreateUsersTable extends Migration {
|
||||
$table->dateTime('join_time')->nullable();
|
||||
$table->dateTime('last_seen_time')->nullable();
|
||||
$table->dateTime('read_time')->nullable();
|
||||
$table->dateTime('notification_read_time')->nullable();
|
||||
$table->integer('discussions_count')->unsigned()->default(0);
|
||||
$table->integer('comments_count')->unsigned()->default(0);
|
||||
});
|
||||
|
Reference in New Issue
Block a user