mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
add seeders and migrations + rhilip/bencode
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePersonalAccessTokensTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAdclicksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('adclicks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('adid')->nullable();
|
||||
$table->unsignedInteger('userid')->nullable();
|
||||
$table->dateTime('added')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('adclicks');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAdminpanelTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('adminpanel', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 128)->default('');
|
||||
$table->string('url')->default('');
|
||||
$table->string('info')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('adminpanel');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAdvertisementsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('advertisements', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->boolean('enabled')->default(0);
|
||||
$table->enum('type', ['bbcodes', 'xhtml', 'text', 'image', 'flash']);
|
||||
$table->enum('position', ['header', 'footer', 'belownav', 'belowsearchbox', 'torrentdetail', 'comment', 'interoverforums', 'forumpost', 'popup']);
|
||||
$table->tinyInteger('displayorder')->default(0);
|
||||
$table->string('name')->default('');
|
||||
$table->text('parameters');
|
||||
$table->text('code');
|
||||
$table->dateTime('starttime');
|
||||
$table->dateTime('endtime');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('advertisements');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAgentAllowedExceptionTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('agent_allowed_exception', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('family_id')->default(0)->index('family_id');
|
||||
$table->string('name', 100)->default('');
|
||||
$table->string('peer_id', 20)->default('');
|
||||
$table->string('agent', 100)->default('');
|
||||
$table->string('comment', 200)->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('agent_allowed_exception');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAgentAllowedFamilyTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('agent_allowed_family', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('family', 50)->default('');
|
||||
$table->string('start_name', 100)->default('');
|
||||
$table->string('peer_id_pattern', 200)->default('');
|
||||
$table->unsignedTinyInteger('peer_id_match_num')->default(0);
|
||||
$table->enum('peer_id_matchtype', ['dec', 'hex'])->default('dec');
|
||||
$table->string('peer_id_start', 20)->default('');
|
||||
$table->string('agent_pattern', 200)->default('');
|
||||
$table->unsignedTinyInteger('agent_match_num')->default(0);
|
||||
$table->enum('agent_matchtype', ['dec', 'hex'])->default('dec');
|
||||
$table->string('agent_start', 100)->default('');
|
||||
$table->enum('exception', ['yes', 'no'])->default('no');
|
||||
$table->enum('allowhttps', ['yes', 'no'])->default('no');
|
||||
$table->string('comment', 200)->default('');
|
||||
$table->unsignedMediumInteger('hits')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('agent_allowed_family');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAllowedemailsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('allowedemails', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->mediumText('value');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('allowedemails');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAttachmentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('attachments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->unsignedSmallInteger('width')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->string('filename')->default('');
|
||||
$table->char('dlkey', 32)->index('idx_delkey');
|
||||
$table->string('filetype', 50)->default('');
|
||||
$table->unsignedBigInteger('filesize')->default(0);
|
||||
$table->string('location')->default('');
|
||||
$table->mediumInteger('downloads')->default(0);
|
||||
$table->boolean('isimage')->unsigned()->default(0);
|
||||
$table->boolean('thumb')->unsigned()->default(0);
|
||||
$table->index(['userid', 'id'], 'pid');
|
||||
$table->index(['added', 'isimage', 'downloads'], 'dateline');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('attachments');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAttendanceTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('attendance', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedInteger('uid')->default(0)->index('idx_uid');
|
||||
$table->dateTime('added');
|
||||
$table->unsignedInteger('points')->default(0);
|
||||
$table->unsignedInteger('days')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('attendance');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAudiocodecsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('audiocodecs', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->string('image')->default('');
|
||||
$table->unsignedTinyInteger('sort_index')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('audiocodecs');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAvpsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('avps', function (Blueprint $table) {
|
||||
$table->string('arg', 20)->default('')->primary();
|
||||
$table->text('value_s');
|
||||
$table->integer('value_i')->default(0);
|
||||
$table->unsignedInteger('value_u')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('avps');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBannedemailsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bannedemails', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->mediumText('value');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bannedemails');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBansTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bans', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->unsignedMediumInteger('addedby')->default(0);
|
||||
$table->string('comment')->default('');
|
||||
$table->bigInteger('first')->default(0);
|
||||
$table->bigInteger('last')->default(0);
|
||||
$table->index(['first', 'last'], 'first_last');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bans');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBitbucketTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bitbucket', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('owner')->default(0);
|
||||
$table->string('name')->default('');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->enum('public', ['0', '1'])->default('0');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bitbucket');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBlocksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('blocks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->unsignedMediumInteger('blockid')->default(0);
|
||||
$table->unique(['userid', 'blockid'], 'userfriend');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('blocks');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBookmarksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bookmarks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrentid')->default(0);
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->index(['userid', 'torrentid'], 'userid_torrentid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bookmarks');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('categories', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedTinyInteger('mode')->default(1);
|
||||
$table->string('class_name')->default('');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->string('image')->default('');
|
||||
$table->unsignedSmallInteger('sort_index')->default(0);
|
||||
$table->integer('icon_id')->default(0);
|
||||
$table->index(['mode', 'sort_index'], 'mode_sort');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('categories');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCaticonsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('caticons', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 64)->default('');
|
||||
$table->string('folder')->default('');
|
||||
$table->string('cssfile')->default('');
|
||||
$table->enum('multilang', ['yes', 'no'])->default('no');
|
||||
$table->enum('secondicon', ['yes', 'no'])->default('no');
|
||||
$table->string('designer', 50)->default('');
|
||||
$table->string('comment')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('caticons');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCheatersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cheaters', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->unsignedMediumInteger('torrentid')->default(0);
|
||||
$table->unsignedBigInteger('uploaded')->default(0);
|
||||
$table->unsignedBigInteger('downloaded')->default(0);
|
||||
$table->unsignedMediumInteger('anctime')->default(0);
|
||||
$table->unsignedMediumInteger('seeders')->default(0);
|
||||
$table->unsignedMediumInteger('leechers')->default(0);
|
||||
$table->unsignedTinyInteger('hit')->default(0);
|
||||
$table->unsignedMediumInteger('dealtby')->default(0);
|
||||
$table->boolean('dealtwith')->default(0);
|
||||
$table->string('comment')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cheaters');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateChronicleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('chronicle', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->dateTime('added')->nullable()->index('added');
|
||||
$table->text('txt')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('chronicle');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCodecsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('codecs', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->unsignedTinyInteger('sort_index')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('codecs');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCommentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('comments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('user')->default(0)->index('user');
|
||||
$table->unsignedMediumInteger('torrent')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->text('text')->nullable();
|
||||
$table->text('ori_text')->nullable();
|
||||
$table->unsignedMediumInteger('editedby')->default(0);
|
||||
$table->dateTime('editdate')->nullable();
|
||||
$table->unsignedMediumInteger('offer')->default(0);
|
||||
$table->integer('request')->default(0);
|
||||
$table->enum('anonymous', ['yes', 'no'])->default('no');
|
||||
$table->index(['torrent', 'id'], 'torrent_id');
|
||||
$table->index(['offer', 'id'], 'offer_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('comments');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCountriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('countries', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 50)->default('');
|
||||
$table->string('flagpic')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('countries');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDownloadspeedTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('downloadspeed', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 50)->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('downloadspeed');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExamProgressTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exam_progress', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('exam_user_id')->index();
|
||||
$table->integer('exam_id')->index();
|
||||
$table->integer('uid')->index();
|
||||
$table->integer('torrent_id');
|
||||
$table->integer('index');
|
||||
$table->bigInteger('value');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exam_progress');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExamUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exam_users', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('uid')->index();
|
||||
$table->integer('exam_id')->index();
|
||||
$table->integer('status')->default(0);
|
||||
$table->dateTime('begin')->nullable();
|
||||
$table->dateTime('end')->nullable();
|
||||
$table->text('progress')->nullable();
|
||||
$table->tinyInteger('is_done')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exam_users');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExamsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exams', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->text('description')->nullable();
|
||||
$table->dateTime('begin')->nullable();
|
||||
$table->dateTime('end')->nullable();
|
||||
$table->integer('duration')->default(0);
|
||||
$table->text('filters')->nullable();
|
||||
$table->text('indexes');
|
||||
$table->tinyInteger('status')->default(0);
|
||||
$table->tinyInteger('is_discovered')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exams');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFaqTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('faq', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('link_id')->default(0);
|
||||
$table->unsignedSmallInteger('lang_id')->default(6);
|
||||
$table->enum('type', ['categ', 'item'])->default('item');
|
||||
$table->text('question');
|
||||
$table->text('answer');
|
||||
$table->unsignedTinyInteger('flag')->default(1);
|
||||
$table->unsignedSmallInteger('categ')->default(0);
|
||||
$table->unsignedSmallInteger('order')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('faq');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFilesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('files', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrent')->default(0)->index('torrent');
|
||||
$table->string('filename')->default('');
|
||||
$table->unsignedBigInteger('size')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('files');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateForummodsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('forummods', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('forumid')->default(0)->index('forumid');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('forummods');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateForumsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('forums', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('sort')->default(0);
|
||||
$table->string('name', 60)->default('');
|
||||
$table->string('description')->default('');
|
||||
$table->unsignedTinyInteger('minclassread')->default(0);
|
||||
$table->unsignedTinyInteger('minclasswrite')->default(0);
|
||||
$table->unsignedInteger('postcount')->default(0);
|
||||
$table->unsignedInteger('topiccount')->default(0);
|
||||
$table->unsignedTinyInteger('minclasscreate')->default(0);
|
||||
$table->unsignedSmallInteger('forid')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('forums');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFriendsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('friends', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->unsignedMediumInteger('friendid')->default(0);
|
||||
$table->unique(['userid', 'friendid'], 'userfriend');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('friends');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFunTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('fun', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->text('body')->nullable();
|
||||
$table->string('title')->default('');
|
||||
$table->enum('status', ['normal', 'dull', 'notfunny', 'funny', 'veryfunny', 'banned'])->default('normal');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('fun');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFundsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('funds', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->decimal('usd')->default(0.00);
|
||||
$table->decimal('cny')->default(0.00);
|
||||
$table->unsignedMediumInteger('user')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->string('memo')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('funds');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFunvotesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('funvotes', function (Blueprint $table) {
|
||||
$table->unsignedMediumInteger('funid');
|
||||
$table->unsignedMediumInteger('userid');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->enum('vote', ['fun', 'dull'])->default('fun');
|
||||
$table->primary(['funid', 'userid']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('funvotes');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateInvitesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('invites', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('inviter')->default(0);
|
||||
$table->string('invitee', 80)->default('');
|
||||
$table->char('hash', 32)->index('hash');
|
||||
$table->dateTime('time_invited')->nullable();
|
||||
$table->tinyInteger('valid')->default(1);
|
||||
$table->integer('invitee_register_uid')->nullable();
|
||||
$table->string('invitee_register_email')->nullable();
|
||||
$table->string('invitee_register_username')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('invites');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateIplogTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('iplog', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('ip', 64)->default('');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->dateTime('access')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('iplog');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateIspTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('isp', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('isp');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLanguageTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('language', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('lang_name', 50)->default('');
|
||||
$table->string('flagpic')->default('');
|
||||
$table->unsignedTinyInteger('sub_lang')->default(1);
|
||||
$table->unsignedTinyInteger('rule_lang')->default(0);
|
||||
$table->unsignedTinyInteger('site_lang')->default(0);
|
||||
$table->string('site_lang_folder')->default('');
|
||||
$table->enum('trans_state', ['up-to-date', 'outdate', 'incomplete', 'need-new', 'unavailable'])->default('unavailable');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('language');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLinksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('links', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->string('url')->default('');
|
||||
$table->string('title', 50)->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('links');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLocationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('locations', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('location_main', 200)->default('');
|
||||
$table->string('location_sub', 200)->default('');
|
||||
$table->string('flagpic', 50)->nullable();
|
||||
$table->string('start_ip', 20)->default('');
|
||||
$table->string('end_ip', 20)->default('');
|
||||
$table->unsignedInteger('theory_upspeed')->default(10);
|
||||
$table->unsignedInteger('practical_upspeed')->default(10);
|
||||
$table->unsignedInteger('theory_downspeed')->default(10);
|
||||
$table->unsignedInteger('practical_downspeed')->default(10);
|
||||
$table->unsignedInteger('hit')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('locations');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLoginattemptsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('loginattempts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('ip', 64)->default('');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->enum('banned', ['yes', 'no'])->default('no');
|
||||
$table->unsignedSmallInteger('attempts')->default(0);
|
||||
$table->enum('type', ['login', 'recover'])->default('login');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('loginattempts');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateMagicTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('magic', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('torrentid')->default(0)->index('idx_torrentid');
|
||||
$table->integer('userid')->default(0)->index('idx_userid');
|
||||
$table->integer('value')->default(0);
|
||||
$table->timestamp('created_at')->useCurrent();
|
||||
$table->timestamp('updated_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('magic');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateMediaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('media', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->unsignedTinyInteger('sort_index')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('media');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateMessagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('messages', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('sender')->default(0)->index('sender');
|
||||
$table->unsignedMediumInteger('receiver')->default(0)->index('receiver');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->string('subject', 128)->default('');
|
||||
$table->text('msg')->nullable();
|
||||
$table->enum('unread', ['yes', 'no'])->default('yes');
|
||||
$table->smallInteger('location')->default(1);
|
||||
$table->enum('saved', ['no', 'yes'])->default('no');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('messages');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateModpanelTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('modpanel', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 128)->default('');
|
||||
$table->string('url')->default('');
|
||||
$table->string('info')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('modpanel');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateNewsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('news', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->dateTime('added')->nullable()->index('added');
|
||||
$table->text('body')->nullable();
|
||||
$table->string('title')->default('');
|
||||
$table->enum('notify', ['yes', 'no'])->default('no');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('news');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOffersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('offers', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->string('name', 225)->default('');
|
||||
$table->text('descr')->nullable();
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->dateTime('allowedtime')->nullable();
|
||||
$table->unsignedSmallInteger('yeah')->default(0);
|
||||
$table->unsignedSmallInteger('against')->default(0);
|
||||
$table->unsignedSmallInteger('category')->default(0);
|
||||
$table->unsignedMediumInteger('comments')->default(0);
|
||||
$table->enum('allowed', ['allowed', 'pending', 'denied'])->default('pending');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('offers');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOffervotesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('offervotes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('offerid')->default(0);
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->enum('vote', ['yeah', 'against'])->default('yeah');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('offervotes');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOverforumsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('overforums', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 60)->default('');
|
||||
$table->string('description')->default('');
|
||||
$table->unsignedTinyInteger('minclassview')->default(0);
|
||||
$table->unsignedTinyInteger('sort')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('overforums');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePeersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('peers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrent')->default(0)->index('torrent');
|
||||
$table->binary('peer_id');
|
||||
$table->string('ip', 64)->default('');
|
||||
$table->unsignedSmallInteger('port')->default(0);
|
||||
$table->unsignedBigInteger('uploaded')->default(0);
|
||||
$table->unsignedBigInteger('downloaded')->default(0);
|
||||
$table->unsignedBigInteger('to_go')->default(0);
|
||||
$table->enum('seeder', ['yes', 'no'])->default('no');
|
||||
$table->dateTime('started')->nullable();
|
||||
$table->dateTime('last_action')->nullable();
|
||||
$table->dateTime('prev_action')->nullable();
|
||||
$table->enum('connectable', ['yes', 'no'])->default('yes');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->string('agent', 60)->default('');
|
||||
$table->unsignedInteger('finishedat')->default(0);
|
||||
$table->unsignedBigInteger('downloadoffset')->default(0);
|
||||
$table->unsignedBigInteger('uploadoffset')->default(0);
|
||||
$table->char('passkey', 32)->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('peers');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePmboxesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pmboxes', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->unsignedTinyInteger('boxnumber')->default(2);
|
||||
$table->string('name', 15)->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pmboxes');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePollanswersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pollanswers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('pollid')->default(0)->index('pollid');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->unsignedTinyInteger('selection')->default(0)->index('selection');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pollanswers');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePollsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('polls', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->string('question')->default('');
|
||||
$table->string('option0', 40)->default('');
|
||||
$table->string('option1', 40)->default('');
|
||||
$table->string('option2', 40)->default('');
|
||||
$table->string('option3', 40)->default('');
|
||||
$table->string('option4', 40)->default('');
|
||||
$table->string('option5', 40)->default('');
|
||||
$table->string('option6', 40)->default('');
|
||||
$table->string('option7', 40)->default('');
|
||||
$table->string('option8', 40)->default('');
|
||||
$table->string('option9', 40)->default('');
|
||||
$table->string('option10', 40)->default('');
|
||||
$table->string('option11', 40)->default('');
|
||||
$table->string('option12', 40)->default('');
|
||||
$table->string('option13', 40)->default('');
|
||||
$table->string('option14', 40)->default('');
|
||||
$table->string('option15', 40)->default('');
|
||||
$table->string('option16', 40)->default('');
|
||||
$table->string('option17', 40)->default('');
|
||||
$table->string('option18', 40)->default('');
|
||||
$table->string('option19', 40)->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('polls');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePostsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('posts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('topicid')->default(0);
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->dateTime('added')->nullable()->index('added');
|
||||
$table->text('body')->nullable()->index('body');
|
||||
$table->text('ori_body')->nullable();
|
||||
$table->unsignedMediumInteger('editedby')->default(0);
|
||||
$table->dateTime('editdate')->nullable();
|
||||
$table->index(['topicid', 'id'], 'topicid_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('posts');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProcessingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('processings', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->unsignedTinyInteger('sort_index')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('processings');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProlinkclicksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('prolinkclicks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->string('ip', 64)->default('');
|
||||
$table->dateTime('added')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('prolinkclicks');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateReadpostsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('readposts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->unsignedMediumInteger('topicid')->default(0)->index('topicid');
|
||||
$table->unsignedInteger('lastpostread')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('readposts');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRegimagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('regimages', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->string('imagehash', 32)->default('');
|
||||
$table->string('imagestring', 8)->default('');
|
||||
$table->unsignedInteger('dateline')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('regimages');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateReportsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('reports', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('addedby')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->unsignedInteger('reportid')->default(0);
|
||||
$table->enum('type', ['torrent', 'user', 'offer', 'request', 'post', 'comment', 'subtitle'])->default('torrent');
|
||||
$table->string('reason')->default('');
|
||||
$table->unsignedMediumInteger('dealtby')->default(0);
|
||||
$table->boolean('dealtwith')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('reports');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRequestsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('requests', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('userid')->default(0)->index('userid');
|
||||
$table->string('request', 225)->default('');
|
||||
$table->text('descr');
|
||||
$table->unsignedInteger('comments')->default(0);
|
||||
$table->unsignedInteger('hits')->default(0);
|
||||
$table->unsignedInteger('cat')->default(0);
|
||||
$table->unsignedInteger('filledby')->default(0);
|
||||
$table->unsignedInteger('torrentid')->default(0);
|
||||
$table->enum('finish', ['yes', 'no'])->default('no');
|
||||
$table->integer('amount')->default(0);
|
||||
$table->string('ori_descr')->default('');
|
||||
$table->integer('ori_amount')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->index(['finish', 'userid'], 'finish, userid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('requests');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateResreqTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('resreq', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('reqid')->default(0)->index('reqid');
|
||||
$table->integer('torrentid')->default(0);
|
||||
$table->enum('chosen', ['yes', 'no'])->default('no');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('resreq');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRulesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('rules', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedSmallInteger('lang_id')->default(6);
|
||||
$table->string('title')->default('');
|
||||
$table->text('text')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('rules');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSchoolsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('schools', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('schools');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSearchboxFieldsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('searchbox_fields', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('searchbox_id');
|
||||
$table->string('field_type');
|
||||
$table->integer('field_id')->default(0);
|
||||
$table->timestamp('created_at')->useCurrent();
|
||||
$table->timestamp('update_at')->useCurrent();
|
||||
$table->unique(['searchbox_id', 'field_type', 'field_id'], 'uniq_searchbox_type_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('searchbox_fields');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSearchboxTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('searchbox', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 30)->nullable();
|
||||
$table->boolean('showsubcat')->default(0);
|
||||
$table->boolean('showsource')->default(0);
|
||||
$table->boolean('showmedium')->default(0);
|
||||
$table->boolean('showcodec')->default(0);
|
||||
$table->boolean('showstandard')->default(0);
|
||||
$table->boolean('showprocessing')->default(0);
|
||||
$table->boolean('showteam')->default(0);
|
||||
$table->boolean('showaudiocodec')->default(0);
|
||||
$table->unsignedSmallInteger('catsperrow')->default(7);
|
||||
$table->unsignedSmallInteger('catpadding')->default(25);
|
||||
$table->text('custom_fields')->nullable();
|
||||
$table->string('custom_fields_display_name')->default('');
|
||||
$table->text('custom_fields_display')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('searchbox');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSecondiconsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('secondicons', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->unsignedTinyInteger('source')->default(0);
|
||||
$table->unsignedTinyInteger('medium')->default(0);
|
||||
$table->unsignedTinyInteger('codec')->default(0);
|
||||
$table->unsignedTinyInteger('standard')->default(0);
|
||||
$table->unsignedTinyInteger('processing')->default(0);
|
||||
$table->unsignedTinyInteger('team')->default(0);
|
||||
$table->unsignedTinyInteger('audiocodec')->default(0);
|
||||
$table->string('name', 30)->default('');
|
||||
$table->string('class_name')->nullable();
|
||||
$table->string('image')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('secondicons');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('name')->default('')->unique('uniqe_name');
|
||||
$table->mediumText('value')->nullable();
|
||||
$table->timestamp('created_at')->useCurrent();
|
||||
$table->timestamp('updated_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('settings');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShoutboxTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shoutbox', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->unsignedInteger('date')->default(0);
|
||||
$table->text('text');
|
||||
$table->enum('type', ['sb', 'hb'])->default('sb');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shoutbox');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSitelogTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sitelog', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->dateTime('added')->nullable()->index('added');
|
||||
$table->text('txt');
|
||||
$table->enum('security_level', ['normal', 'mod'])->default('normal');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sitelog');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSnatchedTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('snatched', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->unsignedMediumInteger('torrentid')->default(0);
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->string('ip', 64)->default('');
|
||||
$table->unsignedSmallInteger('port')->default(0);
|
||||
$table->unsignedBigInteger('uploaded')->default(0);
|
||||
$table->unsignedBigInteger('downloaded')->default(0);
|
||||
$table->unsignedBigInteger('to_go')->default(0);
|
||||
$table->unsignedInteger('seedtime')->default(0);
|
||||
$table->unsignedInteger('leechtime')->default(0);
|
||||
$table->dateTime('last_action')->nullable();
|
||||
$table->dateTime('startdat')->nullable();
|
||||
$table->dateTime('completedat')->nullable();
|
||||
$table->enum('finished', ['yes', 'no'])->default('no');
|
||||
$table->index(['torrentid', 'userid'], 'torrentid_userid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('snatched');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSourcesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sources', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->unsignedTinyInteger('sort_index')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sources');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStaffmessagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('staffmessages', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('sender')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->text('msg')->nullable();
|
||||
$table->string('subject', 128)->default('');
|
||||
$table->unsignedMediumInteger('answeredby')->default(0);
|
||||
$table->boolean('answered')->default(0);
|
||||
$table->text('answer')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('staffmessages');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStandardsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('standards', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->unsignedTinyInteger('sort_index')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('standards');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStylesheetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('stylesheets', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('uri')->default('');
|
||||
$table->string('name', 64)->default('');
|
||||
$table->text('addicode')->nullable();
|
||||
$table->string('designer', 50)->default('');
|
||||
$table->string('comment')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('stylesheets');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSubsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('subs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrent_id')->default(0);
|
||||
$table->unsignedSmallInteger('lang_id')->default(0);
|
||||
$table->string('title')->default('');
|
||||
$table->string('filename')->default('');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->unsignedBigInteger('size')->default(0);
|
||||
$table->unsignedMediumInteger('uppedby')->default(0);
|
||||
$table->enum('anonymous', ['yes', 'no'])->default('no');
|
||||
$table->unsignedMediumInteger('hits')->default(0);
|
||||
$table->string('ext', 10)->default('');
|
||||
$table->index(['torrent_id', 'lang_id'], 'torrentid_langid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('subs');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSuggestTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('suggest', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('keywords')->default('')->index('keywords');
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->dateTime('adddate')->nullable()->index('adddate');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('suggest');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSysoppanelTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sysoppanel', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 128)->default('');
|
||||
$table->string('url')->default('');
|
||||
$table->string('info')->default('');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sysoppanel');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTeamsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('teams', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 30)->default('');
|
||||
$table->unsignedTinyInteger('sort_index')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('teams');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateThanksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('thanks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('torrentid')->default(0);
|
||||
$table->unsignedMediumInteger('userid')->default(0);
|
||||
$table->unique(['torrentid', 'id'], 'torrentid_id');
|
||||
$table->index(['torrentid', 'userid'], 'torrentid_userid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('thanks');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTopicsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('topics', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->unsignedMediumInteger('userid')->default(0)->index('userid');
|
||||
$table->string('subject', 128)->default('')->index('subject');
|
||||
$table->enum('locked', ['yes', 'no'])->default('no');
|
||||
$table->unsignedSmallInteger('forumid')->default(0);
|
||||
$table->unsignedInteger('firstpost')->default(0);
|
||||
$table->unsignedInteger('lastpost')->default(0);
|
||||
$table->enum('sticky', ['no', 'yes'])->default('no');
|
||||
$table->unsignedTinyInteger('hlcolor')->default(0);
|
||||
$table->unsignedInteger('views')->default(0);
|
||||
$table->index(['forumid', 'lastpost'], 'forumid_lastpost');
|
||||
$table->index(['forumid', 'sticky', 'lastpost'], 'forumid_sticky_lastpost');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('topics');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTorrentSecretsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('torrent_secrets', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('uid')->index('idx_uid');
|
||||
$table->integer('torrent_id')->default(0)->index('idx_torrent_id');
|
||||
$table->string('secret');
|
||||
$table->timestamp('created_at')->useCurrent();
|
||||
$table->timestamp('updated_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('torrent_secrets');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTorrentsCustomFieldValuesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('torrents_custom_field_values', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->integer('torrent_id')->default(0)->index('idx_torrent_id');
|
||||
$table->integer('custom_field_id')->default(0)->index('idx_field_id');
|
||||
$table->mediumText('custom_field_value')->nullable()->index('idx_field_value');
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('torrents_custom_field_values');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTorrentsCustomFieldsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('torrents_custom_fields', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('name')->default('');
|
||||
$table->string('label')->default('');
|
||||
$table->enum('type', ['text', 'textarea', 'select', 'radio', 'checkbox', 'image']);
|
||||
$table->tinyInteger('required')->default(0);
|
||||
$table->integer('is_single_row')->default(0);
|
||||
$table->text('options')->nullable();
|
||||
$table->text('help')->nullable();
|
||||
$table->dateTime('created_at');
|
||||
$table->dateTime('updated_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('torrents_custom_fields');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTorrentsStateTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('torrents_state', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('global_sp_state')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('torrents_state');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTorrentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('torrents', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
$table->binary('info_hash')->unique('info_hash');
|
||||
$table->string('name')->default('')->index('name');
|
||||
$table->string('filename')->default('');
|
||||
$table->string('save_as')->default('');
|
||||
$table->text('descr')->nullable();
|
||||
$table->string('small_descr')->default('');
|
||||
$table->text('ori_descr')->nullable();
|
||||
$table->unsignedSmallInteger('category')->default(0);
|
||||
$table->unsignedTinyInteger('source')->default(0);
|
||||
$table->unsignedTinyInteger('medium')->default(0);
|
||||
$table->unsignedTinyInteger('codec')->default(0);
|
||||
$table->unsignedTinyInteger('standard')->default(0);
|
||||
$table->unsignedTinyInteger('processing')->default(0);
|
||||
$table->unsignedTinyInteger('team')->default(0);
|
||||
$table->unsignedTinyInteger('audiocodec')->default(0);
|
||||
$table->unsignedBigInteger('size')->default(0);
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->enum('type', ['single', 'multi'])->default('single');
|
||||
$table->unsignedSmallInteger('numfiles')->default(0);
|
||||
$table->unsignedMediumInteger('comments')->default(0);
|
||||
$table->unsignedInteger('views')->default(0);
|
||||
$table->unsignedInteger('hits')->default(0);
|
||||
$table->unsignedMediumInteger('times_completed')->default(0);
|
||||
$table->unsignedMediumInteger('leechers')->default(0);
|
||||
$table->unsignedMediumInteger('seeders')->default(0);
|
||||
$table->dateTime('last_action')->nullable();
|
||||
$table->enum('visible', ['yes', 'no'])->default('yes');
|
||||
$table->enum('banned', ['yes', 'no'])->default('no');
|
||||
$table->unsignedMediumInteger('owner')->default(0)->index('owner');
|
||||
$table->binary('nfo')->nullable();
|
||||
$table->unsignedTinyInteger('sp_state')->default(1);
|
||||
$table->unsignedTinyInteger('promotion_time_type')->default(0);
|
||||
$table->dateTime('promotion_until')->nullable();
|
||||
$table->enum('anonymous', ['yes', 'no'])->default('no');
|
||||
$table->unsignedInteger('url')->nullable()->index('url');
|
||||
$table->string('pos_state', 32)->default('normal');
|
||||
$table->unsignedTinyInteger('cache_stamp')->default(0);
|
||||
$table->enum('picktype', ['hot', 'classic', 'recommended', 'normal'])->default('normal');
|
||||
$table->dateTime('picktime')->nullable();
|
||||
$table->dateTime('last_reseed')->nullable();
|
||||
$table->mediumText('pt_gen')->nullable();
|
||||
$table->integer('tags')->default(0);
|
||||
$table->text('technical_info')->nullable();
|
||||
$table->index(['visible', 'pos_state', 'id'], 'visible_pos_id');
|
||||
$table->index(['category', 'visible', 'banned'], 'category_visible_banned');
|
||||
$table->index(['visible', 'banned', 'pos_state', 'id'], 'visible_banned_pos_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('torrents');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUploadspeedTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('uploadspeed', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('uploadspeed');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserBanLogsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_ban_logs', function (Blueprint $table) {
|
||||
$table->bigInteger('id', true);
|
||||
$table->integer('uid')->default(0)->index('idx_uid');
|
||||
$table->string('username')->default('')->index('idx_username');
|
||||
$table->integer('operator')->default(0);
|
||||
$table->string('reason')->nullable();
|
||||
$table->timestamp('created_at')->nullable()->useCurrent();
|
||||
$table->timestamp('updated_at')->nullable()->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_ban_logs');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('username', 40)->default('')->unique('username');
|
||||
$table->string('passhash', 32)->default('');
|
||||
$table->binary('secret');
|
||||
$table->string('email', 80)->default('');
|
||||
$table->enum('status', ['pending', 'confirmed'])->default('pending');
|
||||
$table->dateTime('added')->nullable();
|
||||
$table->dateTime('last_login')->nullable();
|
||||
$table->dateTime('last_access')->nullable()->index('last_access');
|
||||
$table->dateTime('last_home')->nullable();
|
||||
$table->dateTime('last_offer')->nullable();
|
||||
$table->dateTime('forum_access')->nullable();
|
||||
$table->dateTime('last_staffmsg')->nullable();
|
||||
$table->dateTime('last_pm')->nullable();
|
||||
$table->dateTime('last_comment')->nullable();
|
||||
$table->dateTime('last_post')->nullable();
|
||||
$table->unsignedInteger('last_browse')->default(0);
|
||||
$table->unsignedInteger('last_music')->default(0);
|
||||
$table->unsignedInteger('last_catchup')->default(0);
|
||||
$table->binary('editsecret');
|
||||
$table->enum('privacy', ['strong', 'normal', 'low'])->default('normal');
|
||||
$table->unsignedTinyInteger('stylesheet')->default(1);
|
||||
$table->unsignedTinyInteger('caticon')->default(1);
|
||||
$table->enum('fontsize', ['small', 'medium', 'large'])->default('medium');
|
||||
$table->text('info')->nullable();
|
||||
$table->enum('acceptpms', ['yes', 'friends', 'no'])->default('yes');
|
||||
$table->enum('commentpm', ['yes', 'no'])->default('yes');
|
||||
$table->string('ip', 64)->default('')->index('ip');
|
||||
$table->unsignedTinyInteger('class')->default(1)->index('class');
|
||||
$table->tinyInteger('max_class_once')->default(1);
|
||||
$table->string('avatar')->default('');
|
||||
$table->unsignedBigInteger('uploaded')->default(0)->index('uploaded');
|
||||
$table->unsignedBigInteger('downloaded')->default(0)->index('downloaded');
|
||||
$table->unsignedBigInteger('seedtime')->default(0);
|
||||
$table->unsignedBigInteger('leechtime')->default(0);
|
||||
$table->string('title', 30)->default('');
|
||||
$table->unsignedSmallInteger('country')->default(107)->index('country');
|
||||
$table->string('notifs', 500)->nullable();
|
||||
$table->text('modcomment')->nullable();
|
||||
$table->enum('enabled', ['yes', 'no'])->default('yes')->index('enabled');
|
||||
$table->enum('avatars', ['yes', 'no'])->default('yes');
|
||||
$table->enum('donor', ['yes', 'no'])->default('no');
|
||||
$table->decimal('donated')->default(0.00);
|
||||
$table->decimal('donated_cny')->default(0.00);
|
||||
$table->dateTime('donoruntil')->nullable();
|
||||
$table->enum('warned', ['yes', 'no'])->default('no')->index('warned');
|
||||
$table->dateTime('warneduntil')->nullable();
|
||||
$table->enum('noad', ['yes', 'no'])->default('no');
|
||||
$table->dateTime('noaduntil')->nullable();
|
||||
$table->unsignedTinyInteger('torrentsperpage')->default(0);
|
||||
$table->unsignedTinyInteger('topicsperpage')->default(0);
|
||||
$table->unsignedTinyInteger('postsperpage')->default(0);
|
||||
$table->enum('clicktopic', ['firstpage', 'lastpage'])->default('firstpage');
|
||||
$table->enum('deletepms', ['yes', 'no'])->default('yes');
|
||||
$table->enum('savepms', ['yes', 'no'])->default('no');
|
||||
$table->enum('showhot', ['yes', 'no'])->default('yes');
|
||||
$table->enum('showclassic', ['yes', 'no'])->default('yes');
|
||||
$table->enum('support', ['yes', 'no'])->default('no');
|
||||
$table->enum('picker', ['yes', 'no'])->default('no');
|
||||
$table->string('stafffor')->default('');
|
||||
$table->string('supportfor')->default('');
|
||||
$table->string('pickfor')->default('');
|
||||
$table->string('supportlang', 50)->default('');
|
||||
$table->string('passkey', 32)->default('')->index('passkey');
|
||||
$table->string('promotion_link', 32)->nullable();
|
||||
$table->enum('uploadpos', ['yes', 'no'])->default('yes');
|
||||
$table->enum('forumpost', ['yes', 'no'])->default('yes');
|
||||
$table->enum('downloadpos', ['yes', 'no'])->default('yes');
|
||||
$table->unsignedTinyInteger('clientselect')->default(0);
|
||||
$table->enum('signatures', ['yes', 'no'])->default('yes');
|
||||
$table->string('signature', 800)->default('');
|
||||
$table->unsignedSmallInteger('lang')->default(6);
|
||||
$table->smallInteger('cheat')->default(0)->index('cheat');
|
||||
$table->unsignedInteger('download')->default(0);
|
||||
$table->unsignedInteger('upload')->default(0);
|
||||
$table->unsignedTinyInteger('isp')->default(0);
|
||||
$table->unsignedSmallInteger('invites')->default(0);
|
||||
$table->unsignedMediumInteger('invited_by')->default(0);
|
||||
$table->enum('gender', ['Male', 'Female', 'N/A'])->default('N/A');
|
||||
$table->enum('vip_added', ['yes', 'no'])->default('no');
|
||||
$table->dateTime('vip_until')->nullable();
|
||||
$table->decimal('seedbonus', 10, 1)->default(0.0);
|
||||
$table->decimal('charity', 10, 1)->default(0.0);
|
||||
$table->text('bonuscomment')->nullable();
|
||||
$table->enum('parked', ['yes', 'no'])->default('no');
|
||||
$table->enum('leechwarn', ['yes', 'no'])->default('no');
|
||||
$table->dateTime('leechwarnuntil')->nullable();
|
||||
$table->dateTime('lastwarned')->nullable();
|
||||
$table->unsignedTinyInteger('timeswarned')->default(0);
|
||||
$table->unsignedMediumInteger('warnedby')->default(0);
|
||||
$table->unsignedSmallInteger('sbnum')->default(70);
|
||||
$table->unsignedSmallInteger('sbrefresh')->default(120);
|
||||
$table->enum('hidehb', ['yes', 'no'])->nullable()->default('no');
|
||||
$table->enum('showimdb', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('showdescription', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('showcomment', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('showclienterror', ['yes', 'no'])->default('no');
|
||||
$table->boolean('showdlnotice')->default(1);
|
||||
$table->enum('tooltip', ['minorimdb', 'medianimdb', 'off'])->default('off');
|
||||
$table->enum('shownfo', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('timetype', ['timeadded', 'timealive'])->nullable()->default('timealive');
|
||||
$table->enum('appendsticky', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('appendnew', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('appendpromotion', ['highlight', 'word', 'icon', 'off'])->nullable()->default('icon');
|
||||
$table->enum('appendpicked', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('dlicon', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('bmicon', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('showsmalldescr', ['yes', 'no'])->default('yes');
|
||||
$table->enum('showcomnum', ['yes', 'no'])->nullable()->default('yes');
|
||||
$table->enum('showlastcom', ['yes', 'no'])->nullable()->default('no');
|
||||
$table->enum('showlastpost', ['yes', 'no'])->default('no');
|
||||
$table->unsignedTinyInteger('pmnum')->default(10);
|
||||
$table->unsignedSmallInteger('school')->default(35);
|
||||
$table->enum('showfb', ['yes', 'no'])->default('yes');
|
||||
$table->string('page')->nullable()->default('');
|
||||
$table->index(['status', 'added'], 'status_added');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user