<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('discussions_tags', function (Blueprint $table) { $table->integer('discussion_id')->unsigned(); $table->integer('tag_id')->unsigned(); $table->primary(['discussion_id', 'tag_id']); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('flags', function (Blueprint $table) { $table->increments('id'); $table->integer('post_id')->unsigned(); $table->string('type'); $table->integer('user_id')->unsigned()->nullable(); $table->string('reason')->nullable(); $table->string('reason_detail')->nullable(); $table->dateTime('time'); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('users_groups', function (Blueprint $table) { $table->integer('user_id')->unsigned(); $table->integer('group_id')->unsigned(); $table->primary(['user_id', 'group_id']); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('users_tags', function (Blueprint $table) { $table->integer('user_id')->unsigned(); $table->integer('tag_id')->unsigned(); $table->dateTime('read_time')->nullable(); $table->boolean('is_hidden')->default(0); $table->primary(['user_id', 'tag_id']); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('auth_tokens', function (Blueprint $table) { $table->string('id', 100)->primary(); $table->string('payload', 150); $table->timestamp('created_at'); });
<?php /* * (c) Sajjad Hashemian <*****@*****.**> */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('links', function (Blueprint $table) { $table->increments('id'); $table->string('title', 50); $table->string('type', 30); $table->string('url', 255); $table->integer('ref_id')->unsigned()->nullable(); $table->integer('position')->nullable(); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('mentions_users', function (Blueprint $table) { $table->integer('post_id')->unsigned(); $table->integer('mentions_id')->unsigned(); $table->primary(['post_id', 'mentions_id']); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('users_discussions', function (Blueprint $table) { $table->integer('user_id')->unsigned(); $table->integer('discussion_id')->unsigned(); $table->dateTime('read_time')->nullable(); $table->integer('read_number')->unsigned()->nullable(); $table->primary(['user_id', 'discussion_id']); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('permissions', function (Blueprint $table) { $table->integer('group_id')->unsigned(); $table->string('permission', 100); $table->primary(['group_id', 'permission']); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('notifications', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned(); $table->integer('sender_id')->unsigned()->nullable(); $table->string('type', 100); $table->string('subject_type', 200)->nullable(); $table->integer('subject_id')->unsigned()->nullable(); $table->binary('data')->nullable(); $table->dateTime('time'); $table->boolean('is_read')->default(0); $table->boolean('is_deleted')->default(0); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('email_tokens', function (Blueprint $table) { $table->string('id', 100)->primary(); $table->string('email', 150); $table->integer('user_id')->unsigned(); $table->timestamp('created_at'); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('api_keys', function (Blueprint $table) { $table->string('id', 100)->primary(); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('config', function (Blueprint $table) { $table->string('key', 100)->primary(); $table->binary('value')->nullable(); });
<?php namespace Davis\SocialProfile\Migration; use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('socialbuttons', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned(); $table->longText('buttons'); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('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(); $table->integer('last_post_number')->unsigned()->nullable(); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('groups', function (Blueprint $table) { $table->increments('id'); $table->string('name_singular', 100); $table->string('name_plural', 100); $table->string('color', 20)->nullable(); $table->string('icon', 100)->nullable(); });
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('users', function (Blueprint $table) { $table->increments('id'); $table->string('username', 100)->unique(); $table->string('email', 150)->unique(); $table->boolean('is_activated')->default(0); $table->string('password', 100); $table->text('bio')->nullable(); $table->string('avatar_path', 100)->nullable(); $table->binary('preferences')->nullable(); $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); });
<?php use Flarum\Database\Migration; use Illuminate\Database\Schema\Blueprint; return Migration::createTable('pages', function (Blueprint $table) { $table->increments('id'); $table->string('title', 200); $table->string('slug', 200); $table->dateTime('time'); $table->dateTime('edit_time')->nullable(); $table->text('content')->nullable(); $table->boolean('is_hidden')->default(0); });