diff --git a/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php b/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php index a6073fce8..24b942eb6 100644 --- a/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_access_tokens_table.php @@ -3,30 +3,30 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateAccessTokensTable extends Migration { +class CreateAccessTokensTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('access_tokens', function(Blueprint $table) - { - $table->string('id', 100)->primary(); - $table->integer('user_id')->unsigned(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('access_tokens'); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('access_tokens', function (Blueprint $table) { + + $table->string('id', 100)->primary(); + $table->integer('user_id')->unsigned(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('access_tokens'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_activity_table.php b/framework/core/migrations/2015_02_24_000000_create_activity_table.php index a1b22d29b..6b5e96a6d 100644 --- a/framework/core/migrations/2015_02_24_000000_create_activity_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_activity_table.php @@ -3,34 +3,34 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateActivityTable extends Migration { +class CreateActivityTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('activity', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('user_id')->unsigned(); - $table->integer('sender_id')->unsigned()->nullable(); - $table->string('type', 100); - $table->binary('data')->nullable(); - $table->dateTime('time'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('activity'); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('activity', function (Blueprint $table) { + + $table->increments('id'); + $table->integer('user_id')->unsigned(); + $table->integer('sender_id')->unsigned()->nullable(); + $table->string('type', 100); + $table->binary('data')->nullable(); + $table->dateTime('time'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('activity'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_config_table.php b/framework/core/migrations/2015_02_24_000000_create_config_table.php index e3e7c3368..058f2d1f1 100644 --- a/framework/core/migrations/2015_02_24_000000_create_config_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_config_table.php @@ -3,30 +3,30 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateConfigTable extends Migration { +class CreateConfigTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('config', function(Blueprint $table) - { - $table->string('key', 100)->primary(); - $table->binary('value')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('config'); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('config', function (Blueprint $table) { + + $table->string('key', 100)->primary(); + $table->binary('value')->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('config'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_discussions_table.php b/framework/core/migrations/2015_02_24_000000_create_discussions_table.php index 97f8a5551..a7fd00e2e 100644 --- a/framework/core/migrations/2015_02_24_000000_create_discussions_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_discussions_table.php @@ -3,41 +3,41 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateDiscussionsTable extends Migration { +class CreateDiscussionsTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('discussions', function(Blueprint $table) - { - $table->increments('id'); - $table->string('title', 200); - $table->integer('comments_count')->unsigned()->default(0); - $table->integer('number_index')->unsigned()->default(0); + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('discussions', function (Blueprint $table) { + + $table->increments('id'); + $table->string('title', 200); + $table->integer('comments_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(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('discussions'); - } + $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(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('discussions'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_notifications_table.php b/framework/core/migrations/2015_02_24_000000_create_notifications_table.php index 8d158e49a..aea969118 100644 --- a/framework/core/migrations/2015_02_24_000000_create_notifications_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_notifications_table.php @@ -3,37 +3,37 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateNotificationsTable extends 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(); + /** + * 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', 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); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('notifications'); - } + $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'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_permissions_table.php b/framework/core/migrations/2015_02_24_000000_create_permissions_table.php index bd01c52c6..42edfc201 100644 --- a/framework/core/migrations/2015_02_24_000000_create_permissions_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_permissions_table.php @@ -3,31 +3,31 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreatePermissionsTable extends Migration { +class CreatePermissionsTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('permissions', function($table) - { - $table->integer('group_id')->unsigned(); - $table->string('permission', 100); - $table->primary(['group_id', 'permission']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('permissions'); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('permissions', function ($table) { + + $table->integer('group_id')->unsigned(); + $table->string('permission', 100); + $table->primary(['group_id', 'permission']); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('permissions'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_posts_table.php b/framework/core/migrations/2015_02_24_000000_create_posts_table.php index 8ccfe3e3d..d5ab988e2 100644 --- a/framework/core/migrations/2015_02_24_000000_create_posts_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_posts_table.php @@ -3,45 +3,45 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreatePostsTable extends Migration { +class CreatePostsTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('posts', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('discussion_id')->unsigned(); - $table->integer('number')->unsigned()->nullable(); + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('posts', function (Blueprint $table) { + + $table->increments('id'); + $table->integer('discussion_id')->unsigned(); + $table->integer('number')->unsigned()->nullable(); - $table->dateTime('time'); - $table->integer('user_id')->unsigned()->nullable(); - $table->string('type', 100)->nullable(); - $table->text('content')->nullable(); - $table->text('content_html')->nullable(); + $table->dateTime('time'); + $table->integer('user_id')->unsigned()->nullable(); + $table->string('type', 100)->nullable(); + $table->text('content')->nullable(); + $table->text('content_html')->nullable(); - $table->dateTime('edit_time')->nullable(); - $table->integer('edit_user_id')->unsigned()->nullable(); - $table->dateTime('hide_time')->nullable(); - $table->integer('hide_user_id')->unsigned()->nullable(); - }); + $table->dateTime('edit_time')->nullable(); + $table->integer('edit_user_id')->unsigned()->nullable(); + $table->dateTime('hide_time')->nullable(); + $table->integer('hide_user_id')->unsigned()->nullable(); + }); - // add fulltext index to content (and title?) - // add unique index on [discussion_id, number] !!! - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('posts'); - } + // add fulltext index to content (and title?) + // add unique index on [discussion_id, number] !!! + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('posts'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_users_discussions_table.php b/framework/core/migrations/2015_02_24_000000_create_users_discussions_table.php index 6b0108aec..bdd5bfea5 100644 --- a/framework/core/migrations/2015_02_24_000000_create_users_discussions_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_users_discussions_table.php @@ -3,33 +3,33 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateUsersDiscussionsTable extends Migration { +class CreateUsersDiscussionsTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('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']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('users_discussions'); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('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']); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('users_discussions'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_users_groups_table.php b/framework/core/migrations/2015_02_24_000000_create_users_groups_table.php index 386036c7e..5d22354a0 100644 --- a/framework/core/migrations/2015_02_24_000000_create_users_groups_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_users_groups_table.php @@ -3,31 +3,31 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateUsersGroupsTable extends Migration { +class CreateUsersGroupsTable extends Migration +{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('users_groups', function(Blueprint $table) - { - $table->integer('user_id')->unsigned(); - $table->integer('group_id')->unsigned(); - $table->primary(['user_id', 'group_id']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('users_groups'); - } + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('users_groups', function (Blueprint $table) { + + $table->integer('user_id')->unsigned(); + $table->integer('group_id')->unsigned(); + $table->primary(['user_id', 'group_id']); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('users_groups'); + } } diff --git a/framework/core/migrations/2015_02_24_000000_create_users_table.php b/framework/core/migrations/2015_02_24_000000_create_users_table.php index 7908afb19..e6f01ae1c 100644 --- a/framework/core/migrations/2015_02_24_000000_create_users_table.php +++ b/framework/core/migrations/2015_02_24_000000_create_users_table.php @@ -3,7 +3,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateUsersTable extends Migration { +class CreateUsersTable extends Migration +{ /** * Run the migrations. @@ -12,8 +13,8 @@ class CreateUsersTable extends Migration { */ public function up() { - Schema::create('users', function(Blueprint $table) - { + Schema::create('users', function (Blueprint $table) { + $table->increments('id'); $table->string('username', 100)->unique(); $table->string('email', 150)->unique(); @@ -43,5 +44,4 @@ class CreateUsersTable extends Migration { { Schema::drop('users'); } - }