mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
add seeders and migrations + rhilip/bencode
This commit is contained in:
47
app/Console/Commands/Install/InitData.php
Normal file
47
app/Console/Commands/Install/InitData.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Install;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class InitData extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'install:init_data';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Initialize data.';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
DB::transaction(function () {
|
||||
$this->call('db:seed');
|
||||
});
|
||||
$this->info("[INIT DATA] success.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
47
app/Console/Commands/Install/Migrate.php
Normal file
47
app/Console/Commands/Install/Migrate.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Install;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class Migrate extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'install:migrate';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Migrate tables.';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
DB::transaction(function () {
|
||||
$this->call('migrate');
|
||||
});
|
||||
$this->info("[MIGRATE TABLE] success.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ use Illuminate\Encryption\Encrypter;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Rhilip\Bencode\Bencode;
|
||||
|
||||
class Test extends Command
|
||||
{
|
||||
@@ -51,11 +52,9 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$reader = new Reader(resource_path('geoip/GeoLite2-City.mmdb'));
|
||||
$record = $reader->city('128.101.101.101');
|
||||
dump($record->city, $record->country, $record->location);
|
||||
$record2 = $reader->isp('128.101.101.101');
|
||||
dump($record2->isp);
|
||||
$file = storage_path('logs/11270.torrent');
|
||||
$r = Bencode::load($file);
|
||||
dd($r);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ class User extends Authenticatable
|
||||
|
||||
public function checkIsNormal(array $fields = ['status', 'enabled'])
|
||||
{
|
||||
if (in_array('visible', $fields) && $this->getAttribute('status') != self::STATUS_CONFIRMED) {
|
||||
if (in_array('status', $fields) && $this->getAttribute('status') != self::STATUS_CONFIRMED) {
|
||||
throw new \InvalidArgumentException(sprintf('User: %s is not confirmed.', $this->id));
|
||||
}
|
||||
if (in_array('enabled', $fields) && $this->getAttribute('enabled') != self::ENABLED_YES) {
|
||||
|
||||
@@ -464,10 +464,12 @@ class ExamRepository extends BaseRepository
|
||||
$join->on("$userTable.id", "=", "$examUserTable.uid")
|
||||
->on("$examUserTable.status", "=", DB::raw(ExamUser::STATUS_NORMAL));
|
||||
})
|
||||
->where('enabled', User::ENABLED_YES)
|
||||
->where('visible', User::STATUS_CONFIRMED)
|
||||
->whereRaw("$examUserTable.id is null")
|
||||
->selectRaw("$userTable.*")
|
||||
->orderBy("$userTable.id", "asc");
|
||||
$size = 100;
|
||||
$size = 1000;
|
||||
$minId = 0;
|
||||
$result = 0;
|
||||
while (true) {
|
||||
@@ -522,7 +524,7 @@ class ExamRepository extends BaseRepository
|
||||
$baseQuery->whereRaw(sprintf("case %s else false end", implode(" ", $whenThens)));
|
||||
}
|
||||
|
||||
$size = 100;
|
||||
$size = 1000;
|
||||
$minId = 0;
|
||||
$result = 0;
|
||||
|
||||
|
||||
@@ -41,11 +41,13 @@
|
||||
"laravel/tinker": "^2.5",
|
||||
"nao-pon/flysystem-google-drive": "^1.1",
|
||||
"orangehill/iseed": "^3.0",
|
||||
"rhilip/bencode": "^1.1",
|
||||
"swiftmailer/swiftmailer": "^6.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"facade/ignition": "^2.5",
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"kitloong/laravel-migrations-generator": "^4.4",
|
||||
"laravel/sail": "^1.0.1",
|
||||
"mockery/mockery": "^1.4.2",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
|
||||
130
composer.lock
generated
130
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "87d34a5b9914da908347ed77069167ea",
|
||||
"content-hash": "a4f805b49bd52cf34ee5f763976ed030",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
@@ -4086,6 +4086,63 @@
|
||||
],
|
||||
"time": "2020-08-18T17:17:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "rhilip/bencode",
|
||||
"version": "v1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Rhilip/Bencode.git",
|
||||
"reference": "d93fa6836ff6a0dcf199906537bce1f5eabfccf9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Rhilip/Bencode/zipball/d93fa6836ff6a0dcf199906537bce1f5eabfccf9",
|
||||
"reference": "d93fa6836ff6a0dcf199906537bce1f5eabfccf9",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.6|^7.0|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"suggest": {
|
||||
"php-64bit": "Running 64 bit is recommended to prevent integer overflow"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Rhilip\\Bencode\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Rhilip",
|
||||
"email": "rhilipruan@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A pure and simple PHP library for encoding and decoding Bencode data",
|
||||
"keywords": [
|
||||
"bencode",
|
||||
"bittorrent",
|
||||
"torrent"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Rhilip/Bencode/issues",
|
||||
"source": "https://github.com/Rhilip/Bencode/tree/master"
|
||||
},
|
||||
"time": "2020-02-27T10:47:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "swiftmailer/swiftmailer",
|
||||
"version": "v6.2.7",
|
||||
@@ -7154,6 +7211,77 @@
|
||||
],
|
||||
"time": "2020-07-09T08:09:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kitloong/laravel-migrations-generator",
|
||||
"version": "4.x-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kitloong/laravel-migrations-generator.git",
|
||||
"reference": "764a304216fbde1a2ed6645fb871105b884cfe54"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kitloong/laravel-migrations-generator/zipball/764a304216fbde1a2ed6645fb871105b884cfe54",
|
||||
"reference": "764a304216fbde1a2ed6645fb871105b884cfe54",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"doctrine/dbal": "~2.4|^3.0",
|
||||
"illuminate/support": "^5.6|^6.0|^7.0|^8.0",
|
||||
"php": ">=7.1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.0",
|
||||
"orchestra/testbench": "^3.6|^4.0|^5.0|^6.0",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"KitLoong\\MigrationsGenerator\\": "src/KitLoong/MigrationsGenerator",
|
||||
"Xethron\\MigrationsGenerator\\": "src/Xethron/MigrationsGenerator",
|
||||
"Way\\Generators\\": "src/Way/Generators"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kit Loong",
|
||||
"email": "kitloong1008@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Generates Laravel Migrations from an existing database",
|
||||
"keywords": [
|
||||
"artisan",
|
||||
"generator",
|
||||
"laravel",
|
||||
"lumen",
|
||||
"migration",
|
||||
"migrations"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/kitloong/laravel-migrations-generator/issues",
|
||||
"source": "https://github.com/kitloong/laravel-migrations-generator/tree/4.x"
|
||||
},
|
||||
"time": "2020-12-31T05:58:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sail",
|
||||
"version": "v1.4.10",
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2021_06_08_113437_create_avps_table.php
Normal file
33
database/migrations/2021_06_08_113437_create_avps_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2021_06_08_113437_create_bans_table.php
Normal file
36
database/migrations/2021_06_08_113437_create_bans_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
40
database/migrations/2021_06_08_113437_create_exams_table.php
Normal file
40
database/migrations/2021_06_08_113437_create_exams_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
38
database/migrations/2021_06_08_113437_create_faq_table.php
Normal file
38
database/migrations/2021_06_08_113437_create_faq_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2021_06_08_113437_create_files_table.php
Normal file
33
database/migrations/2021_06_08_113437_create_files_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2021_06_08_113437_create_fun_table.php
Normal file
35
database/migrations/2021_06_08_113437_create_fun_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2021_06_08_113437_create_funds_table.php
Normal file
35
database/migrations/2021_06_08_113437_create_funds_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2021_06_08_113437_create_iplog_table.php
Normal file
33
database/migrations/2021_06_08_113437_create_iplog_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
31
database/migrations/2021_06_08_113437_create_isp_table.php
Normal file
31
database/migrations/2021_06_08_113437_create_isp_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2021_06_08_113437_create_links_table.php
Normal file
33
database/migrations/2021_06_08_113437_create_links_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2021_06_08_113437_create_magic_table.php
Normal file
35
database/migrations/2021_06_08_113437_create_magic_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_06_08_113437_create_media_table.php
Normal file
32
database/migrations/2021_06_08_113437_create_media_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2021_06_08_113437_create_news_table.php
Normal file
35
database/migrations/2021_06_08_113437_create_news_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
48
database/migrations/2021_06_08_113437_create_peers_table.php
Normal file
48
database/migrations/2021_06_08_113437_create_peers_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
52
database/migrations/2021_06_08_113437_create_polls_table.php
Normal file
52
database/migrations/2021_06_08_113437_create_polls_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
38
database/migrations/2021_06_08_113437_create_posts_table.php
Normal file
38
database/migrations/2021_06_08_113437_create_posts_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2021_06_08_113437_create_rules_table.php
Normal file
33
database/migrations/2021_06_08_113437_create_rules_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
41
database/migrations/2021_06_08_113437_create_subs_table.php
Normal file
41
database/migrations/2021_06_08_113437_create_subs_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_06_08_113437_create_teams_table.php
Normal file
32
database/migrations/2021_06_08_113437_create_teams_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
145
database/migrations/2021_06_08_113437_create_users_table.php
Normal file
145
database/migrations/2021_06_08_113437_create_users_table.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
96
database/seeders/AdminpanelTableSeeder.php
Normal file
96
database/seeders/AdminpanelTableSeeder.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AdminpanelTableSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('adminpanel')->delete();
|
||||
|
||||
\DB::table('adminpanel')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'name' => 'Add user',
|
||||
'url' => 'adduser.php',
|
||||
'info' => 'Create new user account',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 3,
|
||||
'name' => 'Reset Users Password',
|
||||
'url' => 'reset.php',
|
||||
'info' => 'Rest lost Passwords',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 4,
|
||||
'name' => 'Mass PM',
|
||||
'url' => 'staffmess.php',
|
||||
'info' => 'Send PM to all users',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 6,
|
||||
'name' => 'Poll overview',
|
||||
'url' => 'polloverview.php',
|
||||
'info' => 'View poll votes',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'id' => 7,
|
||||
'name' => 'Warned users',
|
||||
'url' => 'warned.php',
|
||||
'info' => 'See all warned users on tracker',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'id' => 8,
|
||||
'name' => 'FreeLeech',
|
||||
'url' => 'freeleech.php',
|
||||
'info' => 'Set ALL Torrents At Special State.',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'id' => 9,
|
||||
'name' => 'FAQ Management',
|
||||
'url' => 'faqmanage.php',
|
||||
'info' => 'Edit/Add/Delete FAQ Page',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'id' => 10,
|
||||
'name' => 'Rules Management',
|
||||
'url' => 'modrules.php',
|
||||
'info' => 'Edit/Add/Delete RULES Page',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'id' => 11,
|
||||
'name' => 'Category Manage',
|
||||
'url' => 'catmanage.php',
|
||||
'info' => 'Manage torrents categories at your site',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'id' => 12,
|
||||
'name' => 'Custom Field Manage',
|
||||
'url' => 'fields.php',
|
||||
'info' => 'Manage custom fields',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
34
database/seeders/AgentAllowedExceptionTableSeeder.php
Normal file
34
database/seeders/AgentAllowedExceptionTableSeeder.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AgentAllowedExceptionTableSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('agent_allowed_exception')->delete();
|
||||
|
||||
\DB::table('agent_allowed_exception')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'family_id' => 16,
|
||||
'name' => 'uTorrent 1.80B (Build 6838)',
|
||||
'peer_id' => '-UT180B-',
|
||||
'agent' => 'uTorrent/180B(6838)',
|
||||
'comment' => 'buggy build that always seeding bad request',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
458
database/seeders/AgentAllowedFamilyTableSeeder.php
Normal file
458
database/seeders/AgentAllowedFamilyTableSeeder.php
Normal file
@@ -0,0 +1,458 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AgentAllowedFamilyTableSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('agent_allowed_family')->delete();
|
||||
|
||||
\DB::table('agent_allowed_family')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'family' => 'Azureus 2.5.0.4',
|
||||
'start_name' => 'Azureus 2.5.0.4',
|
||||
'peer_id_pattern' => '/^-AZ2504-/',
|
||||
'peer_id_match_num' => 0,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-AZ2504-',
|
||||
'agent_pattern' => '/^Azureus 2.5.0.4/',
|
||||
'agent_match_num' => 0,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Azureus 2.5.0.4',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 2,
|
||||
'family' => 'uTorrent 1.6.1',
|
||||
'start_name' => 'uTorrent 1.6.1',
|
||||
'peer_id_pattern' => '/^-UT1610-/',
|
||||
'peer_id_match_num' => 0,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-UT1610-',
|
||||
'agent_pattern' => '/^uTorrent\\/1610/',
|
||||
'agent_match_num' => 0,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'uTorrent/1610',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'no',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 3,
|
||||
'family' => 'Bittorrent 6.x',
|
||||
'start_name' => 'Bittorrent 6.0.1',
|
||||
'peer_id_pattern' => '/^M6-([0-9])-([0-9])--/',
|
||||
'peer_id_match_num' => 2,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => 'M6-0-1--',
|
||||
'agent_pattern' => '/^BitTorrent\\/6([0-9])([0-9])([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'BitTorrent/6010',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 4,
|
||||
'family' => 'Deluge 0.x',
|
||||
'start_name' => 'Deluge 0.5.8.9',
|
||||
'peer_id_pattern' => '/^-DE0([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-DE0589-',
|
||||
'agent_pattern' => '/^Deluge 0\\.([0-9])\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Deluge 0.5.8.9',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'id' => 5,
|
||||
'family' => 'Transmission1.x',
|
||||
'start_name' => 'Transmission 1.06 (build 5136)',
|
||||
'peer_id_pattern' => '/^-TR1([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-TR1060-',
|
||||
'agent_pattern' => '/^Transmission\\/1\\.([0-9])([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Transmission/1.06',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'id' => 6,
|
||||
'family' => 'RTorrent 0.x(with libtorrent 0.x)',
|
||||
'start_name' => 'rTorrent 0.8.0 (with libtorrent 0.12.0)',
|
||||
'peer_id_pattern' => '/^-lt([0-9A-E])([0-9A-E])([0-9A-E])([0-9A-E])-/',
|
||||
'peer_id_match_num' => 4,
|
||||
'peer_id_matchtype' => 'hex',
|
||||
'peer_id_start' => '-lt0C00-',
|
||||
'agent_pattern' => '/^rtorrent\\/0\\.([0-9])\\.([0-9])\\/0\\.([1-9][0-9]*)\\.(0|[1-9][0-9]*)/',
|
||||
'agent_match_num' => 4,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'rtorrent/0.8.0/0.12.0',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'id' => 7,
|
||||
'family' => 'Rufus 0.x',
|
||||
'start_name' => 'Rufus 0.6.9',
|
||||
'peer_id_pattern' => '',
|
||||
'peer_id_match_num' => 0,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '',
|
||||
'agent_pattern' => '/^Rufus\\/0\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Rufus/0.6.9',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'no',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'id' => 8,
|
||||
'family' => 'Azureus 3.x',
|
||||
'start_name' => 'Azureus 3.0.5.0',
|
||||
'peer_id_pattern' => '/^-AZ3([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-AZ3050-',
|
||||
'agent_pattern' => '/^Azureus 3\\.([0-9])\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Azureus 3.0.5.0',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'id' => 9,
|
||||
'family' => 'uTorrent 1.7.x',
|
||||
'start_name' => 'uTorrent 1.7.5',
|
||||
'peer_id_pattern' => '/^-UT17([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 2,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-UT1750-',
|
||||
'agent_pattern' => '/^uTorrent\\/17([0-9])([0-9])/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'uTorrent/1750',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'id' => 10,
|
||||
'family' => 'BitRocket 0.x',
|
||||
'start_name' => 'BitRocket 0.3.3(32)',
|
||||
'peer_id_pattern' => '/^-BR0([0-9])([1-9][0-9]*)-/',
|
||||
'peer_id_match_num' => 2,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-BR0332-',
|
||||
'agent_pattern' => '/^BitRocket\\/0\\.([0-9])\\.([0-9])\\(([1-9][0-9]*)\\) libtorrent\\/0\\.([1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)/',
|
||||
'agent_match_num' => 6,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'BitRocket/0.3.3(32) libtorrent/0.13.0.0',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'id' => 11,
|
||||
'family' => 'MLDonkey 2.9.x',
|
||||
'start_name' => 'MLDonkey 2.9.2',
|
||||
'peer_id_pattern' => '/^-ML2\\.9\\.([0-9])-/',
|
||||
'peer_id_match_num' => 1,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-ML2.9.2-',
|
||||
'agent_pattern' => '/^MLDonkey\\/2\\.9\\.([0-9])/',
|
||||
'agent_match_num' => 1,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'MLDonkey/2.9.2',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'id' => 12,
|
||||
'family' => 'uTorrent 1.8.x',
|
||||
'start_name' => 'uTorrent 1.8.0',
|
||||
'peer_id_pattern' => '/^-UT18([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 2,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-UT1800-',
|
||||
'agent_pattern' => '/^uTorrent\\/18([0-9])([0-9])/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'uTorrent/1800',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'id' => 13,
|
||||
'family' => 'Azureus 4.x',
|
||||
'start_name' => 'Vuze 4.0.0.2',
|
||||
'peer_id_pattern' => '/^-AZ4([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-AZ4002-',
|
||||
'agent_pattern' => '/^Azureus 4\\.([0-9])\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Azureus 4.0.0.2',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
'id' => 14,
|
||||
'family' => 'SymTorrent',
|
||||
'start_name' => '',
|
||||
'peer_id_pattern' => '',
|
||||
'peer_id_match_num' => 0,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '',
|
||||
'agent_pattern' => '/^SymTorrent/',
|
||||
'agent_match_num' => 0,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'SymTorrent',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'no',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
'id' => 15,
|
||||
'family' => 'Deluge 1.x',
|
||||
'start_name' => 'Deluge 1.1.6',
|
||||
'peer_id_pattern' => '/^-DE1([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-DE1160-',
|
||||
'agent_pattern' => '/^Deluge 1\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Deluge 1.1.6',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
15 =>
|
||||
array (
|
||||
'id' => 16,
|
||||
'family' => 'uTorrent 1.8xB',
|
||||
'start_name' => 'uTorrent 1.80 Beta (build 9137)',
|
||||
'peer_id_pattern' => '/^-UT18([0-9])B-/',
|
||||
'peer_id_match_num' => 1,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-UT180B-',
|
||||
'agent_pattern' => '/^uTorrent\\/18([0-9])B\\(([1-9][0-9]*)\\)/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'uTorrent/180B(9137)',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
16 =>
|
||||
array (
|
||||
'id' => 17,
|
||||
'family' => 'uTorrent 2.x.x',
|
||||
'start_name' => 'uTorrent 2.0(build 17624)',
|
||||
'peer_id_pattern' => '/^-UT2([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-UT2000-',
|
||||
'agent_pattern' => '/^uTorrent\\/2([0-9])([0-9])([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'uTorrent/2000',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
17 =>
|
||||
array (
|
||||
'id' => 18,
|
||||
'family' => 'Transmission2.x',
|
||||
'start_name' => 'Transmission 2.0',
|
||||
'peer_id_pattern' => '/^-TR2([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-TR2000-',
|
||||
'agent_pattern' => '/^Transmission\\/2\\.([0-9])([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Transmission/2.00',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
18 =>
|
||||
array (
|
||||
'id' => 19,
|
||||
'family' => 'uTorrent 3.x',
|
||||
'start_name' => 'uTorrent/3000',
|
||||
'peer_id_pattern' => '/^-UT3([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-UT3000-',
|
||||
'agent_pattern' => '/^uTorrent\\/3([0-9])([0-9])([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'uTorrent/3000',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
19 =>
|
||||
array (
|
||||
'id' => 20,
|
||||
'family' => 'uTorrent 3.x',
|
||||
'start_name' => 'uTorrent',
|
||||
'peer_id_pattern' => '',
|
||||
'peer_id_match_num' => 0,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-UT355W-',
|
||||
'agent_pattern' => '/^uTorrent/',
|
||||
'agent_match_num' => 0,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'uTorrent',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
20 =>
|
||||
array (
|
||||
'id' => 21,
|
||||
'family' => 'Transmission3.x',
|
||||
'start_name' => 'Transmission 3.0',
|
||||
'peer_id_pattern' => '/^-TR3([0-9])([0-9])([0-9])-/',
|
||||
'peer_id_match_num' => 3,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-TR3000-',
|
||||
'agent_pattern' => '/^Transmission\\/3\\.([0-9])([0-9])/',
|
||||
'agent_match_num' => 3,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Transmission/3.00',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
21 =>
|
||||
array (
|
||||
'id' => 22,
|
||||
'family' => 'Deluge 2.x',
|
||||
'start_name' => 'Deluge 2.0.0',
|
||||
'peer_id_pattern' => '/^-DE2([0-9])([0-9])/',
|
||||
'peer_id_match_num' => 2,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-DE200',
|
||||
'agent_pattern' => '/^Deluge\\/2\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Deluge/2.0.0',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
22 =>
|
||||
array (
|
||||
'id' => 23,
|
||||
'family' => 'qBittorrent 4.x',
|
||||
'start_name' => 'qBittorrent 4.0.0',
|
||||
'peer_id_pattern' => '/^-qB4([0-9])([0-9])/',
|
||||
'peer_id_match_num' => 2,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-qB400',
|
||||
'agent_pattern' => '/^qBittorrent\\/4\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'qBittorrent/4.0.0',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
23 =>
|
||||
array (
|
||||
'id' => 24,
|
||||
'family' => 'Deluge 1.x',
|
||||
'start_name' => 'Deluge 1.0.0',
|
||||
'peer_id_pattern' => '/^-DE1([0-9])/',
|
||||
'peer_id_match_num' => 1,
|
||||
'peer_id_matchtype' => 'dec',
|
||||
'peer_id_start' => '-DE10',
|
||||
'agent_pattern' => '/^Deluge 1\\.([0-9])\\.([0-9])/',
|
||||
'agent_match_num' => 2,
|
||||
'agent_matchtype' => 'dec',
|
||||
'agent_start' => 'Deluge 1.0.0',
|
||||
'exception' => 'no',
|
||||
'allowhttps' => 'yes',
|
||||
'comment' => '',
|
||||
'hits' => 0,
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user