Skip to content

Commit b837ef6

Browse files
committed
Setting up database dir
1 parent 3372385 commit b837ef6

24 files changed

+851
-0
lines changed

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"autoload": {
2020
"classmap": [
2121
"src/controllers",
22+
"src/database/migrations",
23+
"src/database/seeds",
2224
"src/models",
2325
"src/presenters",
2426
"src/services",
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumModerationTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_moderation', function(Blueprint $table) {
16+
$table->increments('id');
17+
$table->string('resource_type')->index();
18+
$table->string('resource_id', 11)->index();
19+
$table->string('user_id', 10)->index();
20+
$table->text('reason');
21+
$table->boolean('adminReviewFlag')->index();
22+
$table->boolean('completeFlag')->index();
23+
$table->timestamps();
24+
$table->softDeletes();
25+
});
26+
}
27+
28+
/**
29+
* Reverse the migrations.
30+
*
31+
* @return void
32+
*/
33+
public function down()
34+
{
35+
Schema::drop('forum_moderation');
36+
}
37+
38+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumSupportStatusTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_support_status', function(Blueprint $table) {
16+
$table->increments('id');
17+
$table->string('name');
18+
$table->text('description');
19+
$table->timestamps();
20+
});
21+
}
22+
23+
/**
24+
* Reverse the migrations.
25+
*
26+
* @return void
27+
*/
28+
public function down()
29+
{
30+
Schema::drop('forum_support_status');
31+
}
32+
33+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumPostStatusTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_post_status', function(Blueprint $table) {
16+
$table->increments('id');
17+
$table->string('forum_post_id', 10)->index();
18+
$table->integer('forum_support_status_id')->index();
19+
$table->timestamps();
20+
$table->unique(array('forum_post_id', 'forum_support_status_id'));
21+
});
22+
}
23+
24+
/**
25+
* Reverse the migrations.
26+
*
27+
* @return void
28+
*/
29+
public function down()
30+
{
31+
Schema::drop('forum_post_status');
32+
}
33+
34+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumCategoriesTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_categories', function(Blueprint $table) {
16+
$table->string('uniqueId', 10);
17+
$table->primary('uniqueId');
18+
$table->integer('forum_category_type_id')->index();
19+
$table->string('name');
20+
$table->string('keyName')->index();
21+
$table->text('description');
22+
$table->integer('position')->nullable()->index();
23+
$table->string('game_id', 10)->nullable()->index();
24+
$table->timestamps();
25+
$table->softDeletes();
26+
});
27+
}
28+
29+
/**
30+
* Reverse the migrations.
31+
*
32+
* @return void
33+
*/
34+
public function down()
35+
{
36+
Schema::drop('forum_categories');
37+
}
38+
39+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumBoardsTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_boards', function(Blueprint $table) {
16+
$table->string('uniqueId', 10);
17+
$table->primary('uniqueId');
18+
$table->string('forum_category_id', 10)->index();
19+
$table->integer('forum_board_type_id')->index();
20+
$table->string('name');
21+
$table->string('keyName')->index();
22+
$table->text('description');
23+
$table->integer('position')->nullable()->index();
24+
$table->string('parent_id', 10)->nullable()->index();
25+
$table->timestamps();
26+
$table->softDeletes();
27+
});
28+
}
29+
30+
/**
31+
* Reverse the migrations.
32+
*
33+
* @return void
34+
*/
35+
public function down()
36+
{
37+
Schema::drop('forum_boards');
38+
}
39+
40+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumPostsTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_posts', function(Blueprint $table) {
16+
$table->string('uniqueId', 10);
17+
$table->primary('uniqueId');
18+
$table->string('forum_board_id', 10)->index();
19+
$table->integer('forum_post_type_id')->index();
20+
$table->string('user_id', 10)->index();
21+
$table->string('character_id', 10)->index()->nullable();
22+
$table->string('name');
23+
$table->string('keyName')->index();
24+
$table->text('content');
25+
$table->integer('views');
26+
$table->boolean('moderatorLockedFlag')->default(0);
27+
$table->boolean('adminReviewFlag')->default(0);
28+
$table->boolean('approvedFlag')->index();
29+
$table->boolean('frontPageFlag')->index();
30+
$table->timestamps();
31+
$table->datetime('modified_at');
32+
$table->softDeletes();
33+
});
34+
}
35+
36+
/**
37+
* Reverse the migrations.
38+
*
39+
* @return void
40+
*/
41+
public function down()
42+
{
43+
Schema::drop('forum_posts');
44+
}
45+
46+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumPostUserViewsTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_user_view_posts', function(Blueprint $table) {
16+
$table->increments('id');
17+
$table->string('user_id', 10)->index();
18+
$table->string('forum_post_id', 10)->index();
19+
$table->timestamps();
20+
$table->unique(array('forum_post_id', 'user_id'));
21+
});
22+
}
23+
24+
/**
25+
* Reverse the migrations.
26+
*
27+
* @return void
28+
*/
29+
public function down()
30+
{
31+
Schema::drop('forum_user_view_posts');
32+
}
33+
34+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumRepliesTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_replies', function(Blueprint $table) {
16+
$table->string('uniqueId', 10);
17+
$table->primary('uniqueId');
18+
$table->string('forum_post_id', 10)->index();
19+
$table->integer('forum_reply_type_id')->index();
20+
$table->string('user_id', 10)->index();
21+
$table->string('character_id', 10)->index()->nullable();
22+
$table->string('name');
23+
$table->string('keyName');
24+
$table->text('content');
25+
$table->string('quote_id', 10)->index()->nullable();
26+
$table->string('quote_type')->nullable();
27+
$table->boolean('moderatorLockedFlag')->default(0);
28+
$table->boolean('adminReviewFlag')->default(0);
29+
$table->boolean('approvedFlag')->index();
30+
$table->timestamps();
31+
$table->softDeletes();
32+
});
33+
}
34+
35+
/**
36+
* Reverse the migrations.
37+
*
38+
* @return void
39+
*/
40+
public function down()
41+
{
42+
Schema::drop('forum_replies');
43+
}
44+
45+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateForumCategoryTypesTable extends Migration {
7+
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('forum_category_types', function(Blueprint $table) {
16+
$table->increments('id');
17+
$table->string('name');
18+
$table->string('keyName')->index();
19+
$table->text('description');
20+
$table->timestamps();
21+
});
22+
}
23+
24+
/**
25+
* Reverse the migrations.
26+
*
27+
* @return void
28+
*/
29+
public function down()
30+
{
31+
Schema::drop('forum_category_types');
32+
}
33+
34+
}

0 commit comments

Comments
 (0)