Add xethron/migrations-generator and generate migrations

This commit is contained in:
DariusIII
2017-10-12 12:53:55 +02:00
parent e520fc56ea
commit 553c5b1e1b
107 changed files with 2106 additions and 1463 deletions
+1
View File
@@ -1,4 +1,5 @@
2017-10-12 DariusIII
* Chg: Add xethron/migrations-generator and generate migrations
* Chg: Update some of the models
* Fix: Possible fix for bad genres display on XXX cover page
2017-10-11 DariusIII
+2 -1
View File
@@ -151,7 +151,8 @@
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "^6.1"
"phpunit/phpunit": "^6.1",
"xethron/migrations-generator": "^2.0"
},
"scripts": {
Generated
+107 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "f352e545ce83d14246fb7ea318cb12c6",
"content-hash": "f394b4cc384faa1447c0aec1f925f7e8",
"packages": [
{
"name": "adrenth/thetvdb2",
@@ -7087,6 +7087,112 @@
"validate"
],
"time": "2016-11-23T20:04:58+00:00"
},
{
"name": "xethron/laravel-4-generators",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/Xethron/Laravel-4-Generators.git",
"reference": "526f0a07d8ae44e365a20b1bf64c9956acd2a859"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Xethron/Laravel-4-Generators/zipball/526f0a07d8ae44e365a20b1bf64c9956acd2a859",
"reference": "526f0a07d8ae44e365a20b1bf64c9956acd2a859",
"shasum": ""
},
"require": {
"illuminate/support": "~5.0",
"php": ">=5.4.0"
},
"require-dev": {
"behat/behat": "~2.5.1",
"behat/mink": "~1.5.0",
"behat/mink-extension": "~1.2.0",
"behat/mink-goutte-driver": "~1.0.9",
"behat/mink-selenium2-driver": "~1.1.1",
"phpspec/phpspec": "~2.0",
"phpunit/phpunit": "~3.7"
},
"type": "library",
"autoload": {
"psr-0": {
"Way\\Generators": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeffrey Way",
"email": "jeffrey@jeffrey-way.com"
}
],
"description": "Rapidly generate resources, migrations, models, and much more.",
"time": "2017-02-23T11:20:49+00:00"
},
{
"name": "xethron/migrations-generator",
"version": "v2.0.2",
"source": {
"type": "git",
"url": "https://github.com/Xethron/migrations-generator.git",
"reference": "a05bd7319ed808fcc3125212e37d30ccbe0d2b8b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Xethron/migrations-generator/zipball/a05bd7319ed808fcc3125212e37d30ccbe0d2b8b",
"reference": "a05bd7319ed808fcc3125212e37d30ccbe0d2b8b",
"shasum": ""
},
"require": {
"doctrine/dbal": "~2.4",
"illuminate/support": ">=4.1",
"php": ">=5.4.0",
"xethron/laravel-4-generators": "~3.1.0"
},
"require-dev": {
"illuminate/cache": ">=4.1.0",
"illuminate/console": ">=4.1.0",
"mockery/mockery": ">=0.9.0",
"phpunit/phpunit": ">=4.0.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Way\\Generators\\GeneratorsServiceProvider",
"Xethron\\MigrationsGenerator\\MigrationsGeneratorServiceProvider"
]
}
},
"autoload": {
"psr-0": {
"Xethron\\MigrationsGenerator": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Breytenbach",
"email": "bernhard@coffeecode.co.za"
}
],
"description": "Generates Laravel Migrations from an existing database",
"keywords": [
"artisan",
"generator",
"laravel",
"migration",
"migrations"
],
"time": "2017-09-19T17:31:57+00:00"
}
],
"aliases": [],
+2
View File
@@ -177,6 +177,8 @@ return [
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\YencServiceProvider::class,
Way\Generators\GeneratorsServiceProvider::class,
Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class,
],
@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
@@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}
@@ -1,40 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnidbEpisodesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anidb_episodes', function (Blueprint $table) {
$table->integer('anidbid')->comment('ID of title from AniDB');
$table->integer('episodeid');
$table->smallInteger('episode_no');
$table->string('episode_title');
$table->date('airdate');
$table->index(
[
'anidbid',
'episodeid',
]
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anidb_episodes');
}
}
@@ -1,43 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnidbInfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anidb_info', function (Blueprint $table) {
$table->integer('anidbid', false, true)->comment('ID of title from AniDB');
$table->string('type');
$table->date('startdate');
$table->date('enddate');
$table->timestamp('updated');
$table->string('related');
$table->string('similar');
$table->string('creators');
$table->text('description');
$table->string('rating');
$table->string('picture');
$table->string('categories');
$table->string('characters');
$table->index(['startdate', 'enddate', 'updated']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anidb_info');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAudioDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('audio_data', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('audio_data');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBinaryblacklistTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('binaryblacklist', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('binaryblacklist');
}
}
@@ -1,43 +0,0 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('categories', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->integer('parentid');
$table->tinyInteger('status');
$table->string('description');
$table->tinyInteger('disablepreview');
$table->bigInteger('minsizetoformrelease');
$table->bigInteger('maxsizetoformrelease');
$table->primary('id');
$table->index('status');
$table->index('parentid');
});
DB::update('ALTER TABLE categories AUTO_INCREMENT = 1000001');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('categories');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCategoryRegexesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('category_regexes', function (Blueprint $table) {
$table->engine('innodb');
$table->increments('id');
$table->string('group_regex')->default('')->comment('This is a regex to match against usenet groups');
$table->string('regex', '5000')->default('')->comment('Regex used to match a release name to categorize it');
$table->unsignedTinyInteger('status')->default('1')->comment('1=ON 0=OFF');
$table->string('description', '1000')->default('')->comment('Optional extra details on this regex');
$table->integer('ordinal')->default('0')->comment('Order to run the regex in');
$table->unsignedSmallInteger('categories_id')->default('0010')->comment('Which categories id to put the release in');
$table->primary('id');
$table->index('group_regex');
$table->index('status');
$table->index('ordinal');
$table->index('categories_id');
});
DB::update('ALTER TABLE category_regexes AUTO_INCREMENT = 100000');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('category_regexes');
}
}
@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateConsoleinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('consoleinfo', function (Blueprint $table) {
$table->engine = 'innodb';
$table->increments('id');
$table->string('title');
$table->string('asin', '128')->nullable();
$table->string('url', '1000')->nullable();
$table->unsignedInteger('salesrank')->nullable();
$table->string('platform')->nullable();
$table->string('publisher')->nullable();
$table->integer('genres_id')->nullable();
$table->string('esrb')->nullable();
$table->dateTime('releasedate')->nullable();
$table->string('review', '3000')->nullable();
$table->unsignedTinyInteger('cover')->default('0');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->primary('id');
$table->unique('asin', 'ix_consoleinfo_asin');
DB::statement('ALTER TABLE consoleinfo ADD FULLTEXT INDEX ix_consoleinfo_title_platform_ft (title, platform)');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('consoleinfo');
}
}
@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCountriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function (Blueprint $table) {
$table->char('id', 2)->comment('2 character country code');
$table->char('iso3', 3)->comment('3 character country code');
$table->string('country', 180)->coment('Name of the country');
$table->index('iso3', 'ix_code3')->unique();
$table->index('country', 'ix_country')->unique();
$table->primary('id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('countries');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateForumpostTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('forumpost', function (Blueprint $table) {
$table->increments('id');
$table->integer('forumid')->default(1);
$table->integer('parentid')->default(0);
$table->unsignedInteger('users_id');
$table->string('subject', 255);
$table->text('message');
$table->unsignedTinyInteger('locked')->default(0);
$table->unsignedTinyInteger('sticky')->default(0);
$table->integer('replies')->default(0);
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->primary('id');
$table->index('parentid');
$table->index('users_id');
$table->index('created_at');
$table->index('updated_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('forumpost');
}
}
@@ -1,49 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateGamesinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('gamesinfo', function (Blueprint $table) {
$table->engine = 'innodb';
$table->increments('id');
$table->string('title');
$table->string('asin', '128')->nullable();
$table->string('url', '1000')->nullable();
$table->string('publisher')->nullable();
$table->integer('genres_id')->nullable();
$table->string('esrb')->nullable();
$table->dateTime('releasedate')->nullable();
$table->string('review', '3000')->nullable();
$table->unsignedTinyInteger('cover')->default('0');
$table->unsignedTinyInteger('backdrop')->default('0');
$table->string('trailer', 1000)->default('');
$table->string('classused', 10)->default('');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->primary('id');
$table->unique('asin', 'ix_gamesinfo_asin');
$table->unique('title', 'ix_title');
DB::statement('ALTER TABLE gamesinfo ADD FULLTEXT INDEX ix_gamesinfo_title_ft (title)');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('gamesinfo');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateGroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('groups', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 255);
$table->unsignedBigInteger('first_record')->default('0');
$table->dateTime('fisrt_record_postdate');
$table->unsignedBigInteger('last_record')->default('0');
$table->dateTime('last_record_postdate');
$table->dateTime('last_updated');
$table->integer('minfilestoformrelease')->nullable();
$table->bigInteger('minsizetoformrelease')->nullable();
$table->tinyInteger('active')->default('0');
$table->tinyInteger('backfill')->default('0');
$table->string('description', 255)->default('');
$table->primary('id');
$table->index('active', 'ix_active');
$table->unique('name', 'ix_groups_name');
DB::update('ALTER TABLE groups AUTO_INCREMENT = 1000001');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('groups');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMenuTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menu', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('menu');
}
}
@@ -1,50 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMovieinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('movieinfo', function (Blueprint $table) {
$table->increments('id');
$table->unsignedMediumInteger('imdb');
$table->unsignedInteger('tmdbid')->default(0);
$table->string('title', 255)->default('');
$table->string('tagline', 1024)->default('');
$table->string('rating', 4)->default('');
$table->string('plot', 1024)->default('');
$table->string('year', 4)->default('');
$table->string('genre', 64)->default('');
$table->string('type', 32)->default('');
$table->string('director', 64)->default('');
$table->string('actors', 2000)->default('');
$table->string('language', 64)->default('');
$table->string('trailer', 255)->default('');
$table->tinyInteger('cover')->default(0);
$table->tinyInteger('backdrop')->default(0);
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->index('title', 'ix_movieinfo_title');
$table->unique('imdbid', 'ix_movieinfo_imdbid');
DB::statement('ALTER TABLE movieinfo CHANGE imdbid imdbid MEDIUMINT(7) UNSIGNED ZEROFILL NOT NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('movieinfo');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMusicinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('musicinfo', function (Blueprint $table) {
$table->increments('id');
$table->string('title', 255);
$table->string('asin', 128)->nullable();
$table->string('url', 1000)->nullable();
$table->unsignedInteger('salesrank')->nullable();
$table->string('artist', 255)->nullable();
$table->string('publisher', 255)->nullable();
$table->dateTime('releasedate')->nullable();
$table->string('review', 3000)->nullable();
$table->string('year', 4);
$table->integer('genres_id')->nullable();
$table->string('tracks', 3000)->default(0);
$table->tinyInteger('cover')->default(0);
$table->timestamps();
$table->unique(['asin'], 'ux_musicinfo_asin');
DB::statement('ALTER TABLE musicinfo ADD FULLTEXT INDEX ix_musicinfo_artist_title_ft (artist, title)');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('musicinfo');
}
}
@@ -1,50 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePredbTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('predb', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('nfo');
$table->string('size');
$table->string('category');
$table->dateTime('predate');
$table->string('source', 50);
$table->unsignedInteger('request_id');
$table->unsignedInteger('groups_id');
$table->tinyInteger('nuked');
$table->string('nukereason');
$table->string('files');
$table->string('filename');
$table->tinyInteger('searched');
$table->unique('title', 'ix_predb_title');
$table->index('nfo', 'ix_predb_nfo');
$table->index('predate', 'ix_predb_predate');
$table->index('source', 'ix_predb_source');
$table->index(['request_id', 'groups_id'], 'ix_predb_request_group_id');
$table->index('filename');
$table->index('searched', 'ix_predb_search');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('predb');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePredbImportsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('predb_imports', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('predb_imports');
}
}
@@ -1,115 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateReleasesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('releases', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 255)->default('');
$table->string('searchname', 255)->default('');
$table->integer('totalpart');
$table->integer('groups_id');
$table->unsignedBigInteger('size')->default(0);
$table->dateTime('postdate')->nullable();
$table->dateTime('adddate')->nullable();
$table->timestamp('updatetime');
$table->string('gid', 32)->nullable();
$table->string('guid', 40);
$table->char('leftguid', 1);
$table->string('fromname', 255);
$table->float('completion')->default(0);
$table->integer('categories_id')->default(10);
$table->unsignedMediumInteger('videos_id')->default(0);
$table->mediumInteger('tv_episodes_id')->default(0);
$table->mediumInteger('imdbid');
$table->integer('xxxinfo_id')->default(0);
$table->integer('musicinfo_id')->nullable();
$table->integer('consoleinfo_id')->nullable();
$table->integer('gamesinfo_id')->default(0);
$table->integer('bookinfo_id')->nullable();
$table->integer('anidbid')->nullable();
$table->integer('predb_id')->default(0);
$table->integer('grabs')->default(0);
$table->integer('comments')->default(0);
$table->tinyInteger('passwordstatus')->default(0);
$table->integer('rarinnerfilecount')->default(0);
$table->tinyInteger('haspreview')->default(0);
$table->tinyInteger('nfostatus')->default(0);
$table->tinyInteger('jpgstatus')->default(0);
$table->tinyInteger('videostatus')->default(0);
$table->tinyInteger('audiostatus')->default(0);
$table->tinyInteger('dehashstatus')->default(0);
$table->tinyInteger('reqidstatus')->default(0);
$table->binary('nzb_guid')->nullable();
$table->tinyInteger('nzbstatus')->default(0);
$table->tinyInteger('iscategorized')->default(0);
$table->tinyInteger('isrenamed')->default(0);
$table->tinyInteger('ishashed')->default(0);
$table->tinyInteger('isrequestid')->default(0);
$table->tinyInteger('proc_pp')->default(0);
$table->tinyInteger('proc_sorter')->default(0);
$table->tinyInteger('proc_par2')->default(0);
$table->tinyInteger('proc_nfo')->default(0);
$table->tinyInteger('proc_files')->default(0);
$table->tinyInteger('proc_uid')->default(0);
$table->tinyInteger('proc_srr')->default(0);
$table->tinyInteger('proc_hash16k')->default(0);
$table->primary(['id', 'categories_id']);
$table->index(['name'], 'ix_releases_name');
$table->index(['groups_id', 'passwordstatus'], 'ix_releases_groups_id');
$table->index(['postdate', 'searchname'], 'ix_releases_postdate_searchname');
$table->index('guid', 'ix_releases_guid');
$table->index(['leftguid', 'predb_id'], 'ix_releases_leftguid ');
$table->index('nzb_guid', 'ix_releases_nzb_guid');
$table->index('videos_id', 'ix_releases_videos_id');
$table->index('tv_episodes_id', 'ix_releases_tv_episodes_id');
$table->index('imdbid', 'ix_releases_imdbid ');
$table->index('xxxinfo_id', 'ix_releases_xxxinfo_id');
$table->index(['musicinfo_id', 'passwordstatus'], 'ix_releases_musicinfo_id');
$table->index('consoleinfo_id', 'ix_releases_consoleinfo_id');
$table->index('gamesinfo_id', 'ix_releases_gamesinfo_id');
$table->index('bookinfo_id', 'ix_releases_bookinfo_id');
$table->index('anidbid', 'ix_releases_anidbid');
$table->index(['predb_id', 'searchname'], 'ix_releases_predb_id_searchname');
$table->index(['haspreview', 'passwordstatus'], 'ix_releases_haspreview_passwordstatus');
$table->index('passwordstatus', 'ix_releases_passwordstatus');
$table->index(['nfostatus', 'size'], 'ix_releases_nfostatus');
$table->index(['dehashstatus', 'ishashed'], 'ix_releases_dehashstatus');
$table->index(['adddate', 'reqidstatus', 'isrequestid'], 'ix_releases_reqidstatus');
DB::statement('ALTER TABLE releases CHANGE imdbid imdbid MEDIUMINT(7) UNSIGNED ZEROFILL NULL');
DB::statement(
'ALTER TABLE releases PARTITION BY RANGE (categories_id) (
PARTITION misc VALUES LESS THAN (1000),
PARTITION console VALUES LESS THAN (2000),
PARTITION movies VALUES LESS THAN (3000),
PARTITION audio VALUES LESS THAN (4000),
PARTITION pc VALUES LESS THAN (5000),
PARTITION tv VALUES LESS THAN (6000),
PARTITION xxx VALUES LESS THAN (7000),
PARTITION books VALUES LESS THAN (8000)
)'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('releases');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateReleaseFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_files', function (Blueprint $table) {
$table->unsignedInteger('releases_id');
$table->string('name', 255)->default('');
$table->unsignedBigInteger('size')->default(0);
$table->tinyInteger('ishashed')->default(0);
$table->unsignedTinyInteger('passworded')->default(0);
$table->timestamps();
$table->primary(['releases_id', 'name']);
$table->index('ishashed', 'ix_releasefiles_ishashed');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('release_files');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateReleaseNamingRegexesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_naming_regexes', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('release_naming_regexes');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateReleaseSearchDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_search_data', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('release_search_data');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSharingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sharing', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sharing');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSpotnabSourcesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('spotnabsources', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('spotnabsources');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTvEpisodesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tv_episodes', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tv_episodes');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTvInfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tv_info', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tv_info');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateVideosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('videos', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('videos');
}
}
@@ -1,46 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateXxxInfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('xxxinfo', function (Blueprint $table) {
$table->increments('id');
$table->string('title', 1024);
$table->string('tagline', 1024);
$table->binary('plot');
$table->string('genre');
$table->string('director');
$table->string('actors', 2500);
$table->text('extras');
$table->text('productinfo');
$table->text('trailers');
$table->string('directurl', 2000);
$table->string('classused', 20);
$table->unsignedTinyInteger('cover');
$table->unsignedTinyInteger('backdrop');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->unique('title', 'ix_xxxinfo_title');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('xxxinfo');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCollectionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('collections', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('collections');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMissedPartsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('missed_parts', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('missed_parts');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMultigroupBinariesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('multigroup_binaries', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('multigroup_binaries');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMultigroupCollectionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('multigroup_collections', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('multigroup_collections');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMultigroupMissedPartsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('multigroup_missed_parts', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('multigroup_missed_parts');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAllgroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('allgroups', function (Blueprint $table) {
$table->integer('id', true);
$table->string('name')->default('\'\'')->index('ix_allgroups_name');
$table->bigInteger('first_record')->unsigned()->default(0);
$table->bigInteger('last_record')->unsigned()->default(0);
$table->dateTime('updated')->nullable()->default('NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('allgroups');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAnidbEpisodesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anidb_episodes', function (Blueprint $table) {
$table->integer('anidbid')->unsigned()->comment('ID of title from AniDB');
$table->integer('episodeid')->unsigned()->default(0)->comment('anidb id for this episode');
$table->smallInteger('episode_no')->unsigned()->comment('Numeric version of episode (leave 0 for combined episodes).');
$table->string('episode_title')->comment('Title of the episode (en, x-jat)');
$table->date('airdate');
$table->primary(['anidbid','episodeid']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('anidb_episodes');
}
}
@@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAnidbInfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anidb_info', function (Blueprint $table) {
$table->integer('anidbid')->unsigned()->primary()->comment('ID of title from AniDB');
$table->string('type', 32)->nullable()->default('NULL');
$table->date('startdate')->nullable()->default('NULL');
$table->date('enddate')->nullable()->default('NULL');
$table->dateTime('updated')->default('current_timestamp()');
$table->string('related', 1024)->nullable()->default('NULL');
$table->string('similar', 1024)->nullable()->default('NULL');
$table->string('creators', 1024)->nullable()->default('NULL');
$table->text('description', 65535)->nullable()->default('NULL');
$table->string('rating', 5)->nullable()->default('NULL');
$table->string('picture')->nullable()->default('NULL');
$table->string('categories', 1024)->nullable()->default('NULL');
$table->string('characters', 1024)->nullable()->default('NULL');
$table->index(['startdate','enddate','updated'], 'ix_anidb_info_datetime');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('anidb_info');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAnidbTitlesTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,15 @@ class CreateAnidbTitlesTable extends Migration
public function up()
{
Schema::create('anidb_titles', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('anidbid')->unsigned()->comment('ID of title from AniDB');
$table->string('type', 25)->comment('type of title.');
$table->string('lang', 25);
$table->string('title');
$table->primary(['anidbid','type','lang','title']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +30,6 @@ class CreateAnidbTitlesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('anidb_titles');
Schema::drop('anidb_titles');
}
}
@@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAudioDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('audio_data', function (Blueprint $table) {
$table->increments('id');
$table->integer('releases_id')->unsigned()->comment('FK to releases.id');
$table->integer('audioid')->unsigned();
$table->string('audioformat', 50)->nullable()->default('NULL');
$table->string('audiomode', 50)->nullable()->default('NULL');
$table->string('audiobitratemode', 50)->nullable()->default('NULL');
$table->string('audiobitrate', 10)->nullable()->default('NULL');
$table->string('audiochannels', 25)->nullable()->default('NULL');
$table->string('audiosamplerate', 25)->nullable()->default('NULL');
$table->string('audiolibrary', 50)->nullable()->default('NULL');
$table->string('audiolanguage', 50)->nullable()->default('NULL');
$table->string('audiotitle', 50)->nullable()->default('NULL');
$table->unique(['releases_id','audioid'], 'ix_releaseaudio_releaseid_audioid');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('audio_data');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBinariesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('binaries', function (Blueprint $table) {
$table->bigInteger('id', true)->unsigned();
$table->string('name', 1000)->default('\'\'');
$table->integer('collections_id')->unsigned()->default(0)->index('ix_binaries_collection');
$table->integer('filenumber')->unsigned()->default(0);
$table->integer('totalparts')->unsigned()->default(0);
$table->integer('currentparts')->unsigned()->default(0);
$table->binary('binaryhash', 16)->default('\'0$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$\'')->unique('ix_binaries_binaryhash');
$table->boolean('partcheck')->default(0)->index('ix_binaries_partcheck');
$table->bigInteger('partsize')->unsigned()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('binaries');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBinaryblacklistTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('binaryblacklist', function (Blueprint $table) {
$table->increments('id');
$table->string('groupname')->nullable()->default('NULL')->index('ix_binaryblacklist_groupname');
$table->string('regex', 2000);
$table->integer('msgcol')->unsigned()->default(1);
$table->integer('optype')->unsigned()->default(1);
$table->integer('status')->unsigned()->default(1)->index('ix_binaryblacklist_status');
$table->string('description', 1000)->nullable()->default('NULL');
$table->date('last_activity')->nullable()->default('NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('binaryblacklist');
}
}
@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBookinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bookinfo', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('author');
$table->string('asin', 128)->nullable()->default('NULL')->unique('ix_bookinfo_asin');
$table->string('isbn', 128)->nullable()->default('NULL');
$table->string('ean', 128)->nullable()->default('NULL');
$table->string('url', 1000)->nullable()->default('NULL');
$table->integer('salesrank')->unsigned()->nullable()->default('NULL');
$table->string('publisher')->nullable()->default('NULL');
$table->dateTime('publishdate')->nullable()->default('NULL');
$table->string('pages', 128)->nullable()->default('NULL');
$table->string('overview', 3000)->nullable()->default('NULL');
$table->string('genre');
$table->boolean('cover')->default(0);
$table->timestamps();
$table->index(['author','title'], 'ix_bookinfo_author_title_ft');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('bookinfo');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('categories', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->integer('parentid')->nullable()->default('NULL')->index('ix_categories_parentid');
$table->integer('status')->default(1)->index('ix_categories_status');
$table->string('description')->nullable()->default('NULL');
$table->boolean('disablepreview')->default(0);
$table->bigInteger('minsizetoformrelease')->unsigned()->default(0);
$table->bigInteger('maxsizetoformrelease')->unsigned()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('categories');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCategoryRegexesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('category_regexes', function (Blueprint $table) {
$table->increments('id');
$table->string('group_regex')->default('\'\'')->index('ix_category_regexes_group_regex')->comment('This is a regex to match against usenet groups');
$table->string('regex', 5000)->default('\'\'')->comment('Regex used to match a release name to categorize it');
$table->boolean('status')->default(1)->index('ix_category_regexes_status')->comment('1=ON 0=OFF');
$table->string('description', 1000)->default('\'\'')->comment('Optional extra details on this regex');
$table->integer('ordinal')->default(0)->index('ix_category_regexes_ordinal')->comment('Order to run the regex in');
$table->smallInteger('categories_id')->unsigned()->default(10)->index('ix_category_regexes_categories_id')->comment('Which categories id to put the release in');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('category_regexes');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCollectionRegexesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('collection_regexes', function (Blueprint $table) {
$table->increments('id');
$table->string('group_regex')->default('\'\'')->index('ix_collection_regexes_group_regex')->comment('This is a regex to match against usenet groups');
$table->string('regex', 5000)->default('\'\'')->comment('Regex used for collection grouping');
$table->boolean('status')->default(1)->index('ix_collection_regexes_status')->comment('1=ON 0=OFF');
$table->string('description', 1000)->comment('Optional extra details on this regex');
$table->integer('ordinal')->default(0)->index('ix_collection_regexes_ordinal')->comment('Order to run the regex in');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('collection_regexes');
}
}
@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCollectionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('collections', function (Blueprint $table) {
$table->increments('id');
$table->string('subject')->default('\'\'');
$table->string('fromname')->default('\'\'')->index('fromname');
$table->dateTime('date')->nullable()->default('NULL')->index('date');
$table->string('xref', 2000)->default('\'\'');
$table->integer('totalfiles')->unsigned()->default(0);
$table->integer('groups_id')->unsigned()->default(0)->index('groups_id');
$table->string('collectionhash')->default('\'0\'')->unique('ix_collection_collectionhash');
$table->integer('collection_regexes_id')->default(0)->comment('FK to collection_regexes.id');
$table->dateTime('dateadded')->nullable()->default('NULL')->index('ix_collection_dateadded');
$table->dateTime('added')->default('current_timestamp()');
$table->boolean('filecheck')->default(0)->index('ix_collection_filecheck');
$table->bigInteger('filesize')->unsigned()->default(0);
$table->integer('releases_id')->nullable()->default('NULL')->index('ix_collection_releaseid');
$table->char('noise', 32)->default('\'\'');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('collections');
}
}
@@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateConsoleinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('consoleinfo', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('asin', 128)->nullable()->default('NULL')->unique('ix_consoleinfo_asin');
$table->string('url', 1000)->nullable()->default('NULL');
$table->integer('salesrank')->unsigned()->nullable()->default('NULL');
$table->string('platform')->nullable()->default('NULL');
$table->string('publisher')->nullable()->default('NULL');
$table->integer('genres_id')->nullable()->default('NULL');
$table->string('esrb')->nullable()->default('NULL');
$table->dateTime('releasedate')->nullable()->default('NULL');
$table->string('review', 3000)->nullable()->default('NULL');
$table->boolean('cover')->default(0);
$table->timestamps();
$table->index(['title','platform'], 'ix_consoleinfo_title_platform_ft');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('consoleinfo');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateContentTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,30 +14,22 @@ class CreateContentTable extends Migration
public function up()
{
Schema::create('content', function (Blueprint $table) {
$table->increments('id');
$table->integer('id', true);
$table->string('title');
$table->string('url', 2000)->nullable();
$table->text('body')->nullable();
$table->string('url', 2000)->nullable()->default('NULL');
$table->text('body', 65535)->nullable()->default('NULL');
$table->string('metadescription', 1000);
$table->string('metakeywords', 1000);
$table->integer('contenttype');
$table->integer('showinmenu');
$table->integer('status');
$table->integer('ordinal');
$table->integer('ordinal')->nullable()->default('NULL');
$table->integer('role')->default(0);
$table->index(
[
'showinmenu',
'status',
'ordinal',
'role',
],
'ix_showinmenu_status_contenttype_role'
);
DB::update('ALTER TABLE content AUTO_INCREMENT = 1000001');
$table->index(['showinmenu','status','contenttype','role'], 'ix_showinmenu_status_contenttype_role');
});
}
/**
* Reverse the migrations.
*
@@ -45,6 +37,6 @@ class CreateContentTable extends Migration
*/
public function down()
{
Schema::dropIfExists('content');
Schema::drop('content');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCountriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function (Blueprint $table) {
$table->char('id', 2)->primary()->comment('2 character code.');
$table->char('iso3', 3)->unique('code3')->comment('3 character code.');
$table->string('country', 180)->unique('country')->comment('Name of the country.');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('countries');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateDnzbFailuresTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,14 @@ class CreateDnzbFailuresTable extends Migration
public function up()
{
Schema::create('dnzb_failures', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('release_id')->unsigned();
$table->integer('userid')->unsigned();
$table->integer('failed')->unsigned()->default(0);
$table->primary(['release_id','userid']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +29,6 @@ class CreateDnzbFailuresTable extends Migration
*/
public function down()
{
Schema::dropIfExists('dnzb_failures');
Schema::drop('dnzb_failures');
}
}
@@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateForumpostTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('forumpost', function (Blueprint $table) {
$table->increments('id');
$table->integer('forumid')->default(1);
$table->integer('parentid')->default(0)->index('parentid');
$table->integer('users_id')->unsigned()->index('userid');
$table->string('subject');
$table->text('message', 65535);
$table->boolean('locked')->default(0);
$table->boolean('sticky')->default(0);
$table->integer('replies')->unsigned()->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('forumpost');
}
}
@@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateGamesinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('gamesinfo', function (Blueprint $table) {
$table->increments('id');
$table->string('title')->index('ix_title_ft');
$table->string('asin', 128)->nullable()->default('NULL')->unique('ix_gamesinfo_asin');
$table->string('url', 1000)->nullable()->default('NULL');
$table->string('publisher')->nullable()->default('NULL');
$table->integer('genres_id')->nullable()->default('NULL');
$table->string('esrb')->nullable()->default('NULL');
$table->dateTime('releasedate')->nullable()->default('NULL');
$table->string('review', 3000)->nullable()->default('NULL');
$table->boolean('cover')->default(0);
$table->boolean('backdrop')->default(0);
$table->string('trailer', 1000)->default('\'\'');
$table->string('classused', 10)->default('\'steam\'');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('gamesinfo');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateGenresTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,13 +14,14 @@ class CreateGenresTable extends Migration
public function up()
{
Schema::create('genres', function (Blueprint $table) {
$table->increments('id');
$table->integer('id', true);
$table->string('title');
$table->integer('type');
$table->tinyInteger('disabled');
$table->integer('type')->nullable()->default('NULL');
$table->boolean('disabled')->default(0);
});
}
/**
* Reverse the migrations.
*
@@ -28,6 +29,6 @@ class CreateGenresTable extends Migration
*/
public function down()
{
Schema::dropIfExists('genres');
Schema::drop('genres');
}
}
@@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateGroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('groups', function (Blueprint $table) {
$table->integer('id', true);
$table->string('name')->default('\'\'')->unique('ix_groups_name');
$table->integer('backfill_target')->default(1);
$table->bigInteger('first_record')->unsigned()->default(0);
$table->dateTime('first_record_postdate')->nullable()->default('NULL');
$table->bigInteger('last_record')->unsigned()->default(0);
$table->dateTime('last_record_postdate')->nullable()->default('NULL');
$table->dateTime('last_updated')->nullable()->default('NULL');
$table->integer('minfilestoformrelease')->nullable()->default('NULL');
$table->bigInteger('minsizetoformrelease')->nullable()->default('NULL');
$table->boolean('active')->default(0)->index('active');
$table->boolean('backfill')->default(0);
$table->string('description')->nullable()->default('\'\'');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('groups');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateInvitationsTable extends Migration
{
/**
* Run the migrations.
*
@@ -16,11 +16,12 @@ class CreateInvitationsTable extends Migration
Schema::create('invitations', function (Blueprint $table) {
$table->increments('id');
$table->string('guid', 50);
$table->integer('users_id');
$table->dateTime('created_at');
$table->integer('users_id')->unsigned();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
@@ -28,6 +29,6 @@ class CreateInvitationsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('invitations');
Schema::drop('invitations');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBookinfoTable extends Migration
class CreateLoggingTable extends Migration
{
/**
* Run the migrations.
*
@@ -13,12 +13,15 @@ class CreateBookinfoTable extends Migration
*/
public function up()
{
Schema::create('bookinfo', function (Blueprint $table) {
Schema::create('logging', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->dateTime('time')->nullable()->default('NULL');
$table->string('username', 50)->nullable()->default('NULL');
$table->string('host', 40)->nullable()->default('NULL');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +29,6 @@ class CreateBookinfoTable extends Migration
*/
public function down()
{
Schema::dropIfExists('bookinfo');
Schema::drop('logging');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMenuTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menu', function (Blueprint $table) {
$table->increments('id');
$table->string('href', 2000)->default('\'\'');
$table->string('title', 2000)->default('\'\'');
$table->integer('newwindow')->unsigned()->default(0);
$table->string('tooltip', 2000)->default('\'\'');
$table->integer('role')->unsigned();
$table->integer('ordinal')->unsigned();
$table->string('menueval', 2000)->default('\'\'');
$table->index(['role','ordinal'], 'ix_role_ordinal');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('menu');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMissedPartsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('missed_parts', function (Blueprint $table) {
$table->increments('id');
$table->bigInteger('numberid')->unsigned();
$table->integer('groups_id')->unsigned()->default(0)->comment('FK to groups.id');
$table->boolean('attempts')->default(0)->index('ix_missed_parts_attempts');
$table->unique(['numberid','groups_id'], 'ix_missed_parts_numberid_groupsid');
$table->index(['groups_id','attempts'], 'ix_missed_parts_groupid_attempts');
$table->index(['numberid','groups_id','attempts'], 'ix_missed_parts_numberid_groupsid_attempts');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('missed_parts');
}
}
@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMovieinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('movieinfo', function (Blueprint $table) {
$table->increments('id');
$table->integer('imdbid')->unsigned()->unique('ix_movieinfo_imdbid');
$table->integer('tmdbid')->unsigned()->default(0);
$table->string('title')->default('\'\'')->index('ix_movieinfo_title');
$table->string('tagline', 1024)->default('\'\'');
$table->string('rating', 4)->default('\'\'');
$table->string('plot', 1024)->default('\'\'');
$table->string('year', 4)->default('\'\'');
$table->string('genre', 64)->default('\'\'');
$table->string('type', 32)->default('\'\'');
$table->string('director', 64)->default('\'\'');
$table->string('actors', 2000)->default('\'\'');
$table->string('language', 64)->default('\'\'');
$table->boolean('cover')->default(0);
$table->boolean('backdrop')->default(0);
$table->timestamps();
$table->string('trailer')->default('\'\'');
$table->string('rtrating', 10)->default('\'\'')->comment('RottenTomatoes rating score');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('movieinfo');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMultigroupBinariesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('multigroup_binaries', function (Blueprint $table) {
$table->bigInteger('id', true)->unsigned();
$table->string('name', 1000)->default('\'\'');
$table->integer('collections_id')->unsigned()->default(0)->index('ix_binaries_collection');
$table->integer('filenumber')->unsigned()->default(0);
$table->integer('totalparts')->unsigned()->default(0);
$table->integer('currentparts')->unsigned()->default(0);
$table->binary('binaryhash', 16)->default('\'0$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$\'')->unique('ix_binaries_binaryhash');
$table->boolean('partcheck')->default(0)->index('ix_binaries_partcheck');
$table->bigInteger('partsize')->unsigned()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('multigroup_binaries');
}
}
@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMultigroupCollectionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('multigroup_collections', function (Blueprint $table) {
$table->increments('id');
$table->string('subject')->default('\'\'');
$table->string('fromname')->default('\'\'')->index('fromname');
$table->dateTime('date')->nullable()->default('NULL')->index('date');
$table->string('xref', 2000)->default('\'\'');
$table->integer('totalfiles')->unsigned()->default(0);
$table->integer('groups_id')->unsigned()->default(0)->index('groups_id');
$table->string('collectionhash')->default('\'0\'')->unique('ix_collection_collectionhash');
$table->integer('collection_regexes_id')->default(0)->comment('FK to collection_regexes.id');
$table->dateTime('dateadded')->nullable()->default('NULL')->index('ix_collection_dateadded');
$table->dateTime('added')->default('current_timestamp()');
$table->boolean('filecheck')->default(0)->index('ix_collection_filecheck');
$table->bigInteger('filesize')->unsigned()->default(0);
$table->integer('releases_id')->nullable()->default('NULL')->index('ix_collection_releaseid');
$table->char('noise', 32)->default('\'\'');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('multigroup_collections');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMultigroupMissedPartsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('multigroup_missed_parts', function (Blueprint $table) {
$table->increments('id');
$table->bigInteger('numberid')->unsigned();
$table->integer('groups_id')->unsigned()->default(0)->comment('FK to groups.id');
$table->boolean('attempts')->default(0)->index('ix_missed_parts_attempts');
$table->unique(['numberid','groups_id'], 'ix_missed_parts_numberid_groupsid');
$table->index(['groups_id','attempts'], 'ix_missed_parts_groupid_attempts');
$table->index(['numberid','groups_id','attempts'], 'ix_missed_parts_numberid_groupsid_attempts');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('multigroup_missed_parts');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMultigroupPartsTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,16 @@ class CreateMultigroupPartsTable extends Migration
public function up()
{
Schema::create('multigroup_parts', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->bigInteger('binaries_id')->unsigned()->default(0);
$table->string('messageid')->default('\'\'');
$table->bigInteger('number')->unsigned()->default(0);
$table->integer('partnumber')->unsigned()->default(0);
$table->integer('size')->unsigned()->default(0);
$table->primary(['binaries_id','number']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +31,6 @@ class CreateMultigroupPartsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('multigroup_parts');
Schema::drop('multigroup_parts');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCollectionRegexesTable extends Migration
class CreateMultigroupPostersTable extends Migration
{
/**
* Run the migrations.
*
@@ -13,12 +13,13 @@ class CreateCollectionRegexesTable extends Migration
*/
public function up()
{
Schema::create('collection_regexes', function (Blueprint $table) {
Schema::create('multigroup_posters', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('poster')->default('\'\'')->unique('poster');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +27,6 @@ class CreateCollectionRegexesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('collection_regexes');
Schema::drop('multigroup_posters');
}
}
@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMusicinfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('musicinfo', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('asin', 128)->nullable()->default('NULL')->unique('ix_musicinfo_asin');
$table->string('url', 1000)->nullable()->default('NULL');
$table->integer('salesrank')->unsigned()->nullable()->default('NULL');
$table->string('artist')->nullable()->default('NULL');
$table->string('publisher')->nullable()->default('NULL');
$table->dateTime('releasedate')->nullable()->default('NULL');
$table->string('review', 3000)->nullable()->default('NULL');
$table->string('year', 4);
$table->integer('genres_id')->nullable()->default('NULL');
$table->string('tracks', 3000)->nullable()->default('NULL');
$table->boolean('cover')->default(0);
$table->timestamps();
$table->index(['artist','title'], 'ix_musicinfo_artist_title_ft');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('musicinfo');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateParHashesTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,13 @@ class CreateParHashesTable extends Migration
public function up()
{
Schema::create('par_hashes', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('releases_id')->comment('FK to releases.id');
$table->string('hash', 32)->comment('hash_16k block of par2');
$table->primary(['releases_id','hash']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +28,6 @@ class CreateParHashesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('par_hashes');
Schema::drop('par_hashes');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePartsTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,16 @@ class CreatePartsTable extends Migration
public function up()
{
Schema::create('parts', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->bigInteger('binaries_id')->unsigned()->default(0);
$table->string('messageid')->default('\'\'');
$table->bigInteger('number')->unsigned()->default(0);
$table->integer('partnumber')->unsigned()->default(0);
$table->integer('size')->unsigned()->default(0);
$table->primary(['binaries_id','number']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +31,6 @@ class CreatePartsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('parts');
Schema::drop('parts');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePredbHashesTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,12 @@ class CreatePredbHashesTable extends Migration
public function up()
{
Schema::create('predb_hashes', function (Blueprint $table) {
$table->unsignedInteger('predb_id');
$table->binary('hash')->primary();
$table->integer('predb_id')->default(0)->comment('id, of the predb entry, this hash belongs to');
$table->binary('hash', 40)->default('\'\'')->primary();
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +27,6 @@ class CreatePredbHashesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('predb_hashes');
Schema::drop('predb_hashes');
}
}
@@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePredbImportsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('predb_imports', function (Blueprint $table) {
$table->string('title')->default('\'\'');
$table->string('nfo')->nullable()->default('NULL');
$table->string('size', 50)->nullable()->default('NULL');
$table->string('category')->nullable()->default('NULL');
$table->dateTime('predate')->nullable()->default('NULL');
$table->string('source', 50)->default('\'\'');
$table->integer('requestid')->unsigned()->default(0);
$table->integer('groups_id')->unsigned()->default(0)->comment('FK to groups');
$table->boolean('nuked')->default(0)->comment('Is this pre nuked? 0 no 2 yes 1 un nuked 3 mod nuked');
$table->string('nukereason')->nullable()->default('NULL')->comment('If this pre is nuked, what is the reason?');
$table->string('files', 50)->nullable()->default('NULL')->comment('How many files does this pre have ?');
$table->string('filename')->default('\'\'');
$table->boolean('searched')->default(0);
$table->string('groupname')->nullable()->default('NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('predb_imports');
}
}
@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePredbTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('predb', function (Blueprint $table) {
$table->increments('id')->comment('Primary key');
$table->string('title')->default('\'\'')->unique('ix_predb_title');
$table->string('nfo')->nullable()->default('NULL')->index('ix_predb_nfo');
$table->string('size', 50)->nullable()->default('NULL');
$table->string('category')->nullable()->default('NULL');
$table->dateTime('predate')->nullable()->default('NULL')->index('ix_predb_predate');
$table->string('source', 50)->default('\'\'')->index('ix_predb_source');
$table->integer('requestid')->unsigned()->default(0);
$table->integer('groups_id')->unsigned()->default(0)->comment('FK to groups');
$table->boolean('nuked')->default(0)->comment('Is this pre nuked? 0 no 2 yes 1 un nuked 3 mod nuked');
$table->string('nukereason')->nullable()->default('NULL')->comment('If this pre is nuked, what is the reason?');
$table->string('files', 50)->nullable()->default('NULL')->comment('How many files does this pre have ?');
$table->string('filename')->default('\'\'')->index('ft_predb_filename');
$table->boolean('searched')->default(0)->index('ix_predb_searched');
$table->index(['requestid','groups_id'], 'ix_predb_requestid');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('predb');
}
}
@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseCommentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_comments', function (Blueprint $table) {
$table->increments('id');
$table->integer('releases_id')->unsigned()->index('ix_releasecomment_releases_id')->comment('FK to releases.id');
$table->string('text', 2000)->default('\'\'');
$table->boolean('isvisible')->default(1);
$table->boolean('issynced')->default(0);
$table->string('gid', 32)->nullable()->default('NULL');
$table->string('cid', 32)->nullable()->default('NULL');
$table->string('text_hash', 32)->default('\'\'');
$table->string('username')->default('\'\'');
$table->integer('users_id')->unsigned()->index('ix_releasecomment_userid');
$table->timestamps();
$table->string('host', 15)->nullable()->default('NULL');
$table->boolean('shared')->default(0);
$table->string('shareid', 40)->default('\'\'');
$table->string('siteid', 40)->default('\'\'');
$table->bigInteger('sourceid')->unsigned()->nullable()->default('NULL');
$table->binary('nzb_guid', 16)->default('\'0$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$\'');
$table->unique(['text_hash','releases_id'], 'ix_release_comments_hash_releases_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('release_comments');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_files', function (Blueprint $table) {
$table->integer('releases_id')->unsigned()->comment('FK to releases.id');
$table->string('name')->default('\'\'');
$table->bigInteger('size')->unsigned()->default(0);
$table->boolean('ishashed')->default(0)->index('ix_releasefiles_ishashed');
$table->timestamps();
$table->boolean('passworded')->default(0);
$table->primary(['releases_id','name']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('release_files');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseNamingRegexesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_naming_regexes', function (Blueprint $table) {
$table->increments('id');
$table->string('group_regex')->default('\'\'')->index('ix_release_naming_regexes_group_regex')->comment('This is a regex to match against usenet groups');
$table->string('regex', 5000)->default('\'\'')->comment('Regex used for extracting name from subject');
$table->boolean('status')->default(1)->index('ix_release_naming_regexes_status')->comment('1=ON 0=OFF');
$table->string('description', 1000)->default('\'\'')->comment('Optional extra details on this regex');
$table->integer('ordinal')->default(0)->index('ix_release_naming_regexes_ordinal')->comment('Order to run the regex in');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('release_naming_regexes');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseNfosTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,12 +14,12 @@ class CreateReleaseNfosTable extends Migration
public function up()
{
Schema::create('release_nfos', function (Blueprint $table) {
$table->unsignedInteger('releases_id');
$table->binary('nfo');
$table->primary('releases_id');
$table->integer('releases_id')->unsigned()->primary()->comment('FK to releases.id');
$table->binary('nfo', 65535)->nullable()->default('NULL');
});
}
/**
* Reverse the migrations.
*
@@ -27,6 +27,6 @@ class CreateReleaseNfosTable extends Migration
*/
public function down()
{
Schema::dropIfExists('release_nfos');
Schema::drop('release_nfos');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseRegexesTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,14 @@ class CreateReleaseRegexesTable extends Migration
public function up()
{
Schema::create('release_regexes', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('releases_id')->unsigned()->default(0);
$table->integer('collection_regex_id')->default(0);
$table->integer('naming_regex_id')->default(0);
$table->primary(['releases_id','collection_regex_id','naming_regex_id']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +29,6 @@ class CreateReleaseRegexesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('release_regexes');
Schema::drop('release_regexes');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseSearchDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_search_data', function (Blueprint $table) {
$table->increments('id');
$table->integer('releases_id')->unsigned()->index('ix_releasesearch_releases_id')->comment('FK to releases.id');
$table->string('guid', 50)->index('ix_releasesearch_guid');
$table->string('name')->default('\'\'')->index('ix_releasesearch_name_ft');
$table->string('searchname')->default('\'\'')->index('ix_releasesearch_searchname_ft');
$table->string('fromname')->nullable()->default('NULL')->index('ix_releasesearch_fromname_ft');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('release_search_data');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseSubtitlesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('release_subtitles', function (Blueprint $table) {
$table->increments('id');
$table->integer('releases_id')->unsigned()->comment('FK to releases.id');
$table->integer('subsid')->unsigned();
$table->string('subslanguage', 50);
$table->unique(['releases_id','subsid'], 'ix_releasesubs_releases_id_subsid');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('release_subtitles');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseUniqueTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,12 +14,13 @@ class CreateReleaseUniqueTable extends Migration
public function up()
{
Schema::create('release_unique', function (Blueprint $table) {
$table->unsignedInteger('releases_id');
$table->binary('uniqueid');
$table->primary(['releases_id', 'uniqueid']);
$table->integer('releases_id')->unsigned()->comment('FK to releases.id.');
$table->binary('uniqueid', 16)->default('\'0$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$$UP$\'')->comment('Unique_ID from mediainfo.');
$table->primary(['releases_id','uniqueid']);
});
}
/**
* Reverse the migrations.
*
@@ -27,6 +28,6 @@ class CreateReleaseUniqueTable extends Migration
*/
public function down()
{
Schema::dropIfExists('release_unique');
Schema::drop('release_unique');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleaseCommentsTable extends Migration
class CreateReleaseextrafullTable extends Migration
{
/**
* Run the migrations.
*
@@ -13,12 +13,13 @@ class CreateReleaseCommentsTable extends Migration
*/
public function up()
{
Schema::create('release_comments', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
Schema::create('releaseextrafull', function (Blueprint $table) {
$table->integer('releases_id')->unsigned()->primary()->comment('FK to releases.id');
$table->text('mediainfo', 65535)->nullable()->default('NULL');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +27,6 @@ class CreateReleaseCommentsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('release_comments');
Schema::drop('releaseextrafull');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleasesGroupsTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,13 @@ class CreateReleasesGroupsTable extends Migration
public function up()
{
Schema::create('releases_groups', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('releases_id')->unsigned()->default(0)->comment('FK to releases.id');
$table->integer('groups_id')->unsigned()->default(0)->comment('FK to groups.id');
$table->primary(['releases_id','groups_id']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +28,6 @@ class CreateReleasesGroupsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('releases_groups');
Schema::drop('releases_groups');
}
}
@@ -0,0 +1,92 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateReleasesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('releases', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 400)->default('\'\'')->index('ix_releases_name');
$table->string('searchname', 300)->default('\'\'')->comment('Release search name');
$table->integer('totalpart')->nullable()->default(0);
$table->integer('groups_id')->unsigned()->default(0)->comment('FK to groups.id');
$table->bigInteger('size')->unsigned()->default(0);
$table->dateTime('postdate')->nullable()->default('NULL');
$table->dateTime('adddate')->nullable()->default('NULL');
$table->dateTime('updatetime')->default('current_timestamp()');
$table->string('gid', 32)->nullable()->default('NULL');
$table->string('guid', 40)->index('ix_releases_guid');
$table->char('leftguid', 1)->comment('The first letter of the release guid');
$table->string('fromname')->nullable()->default('NULL');
$table->float('completion', 10, 0)->default(0);
$table->integer('categories_id')->default(10);
$table->integer('videos_id')->unsigned()->default(0)->index('ix_releases_videos_id')->comment('FK to videos.id of the parent series.');
$table->integer('tv_episodes_id')->default(0)->index('ix_releases_tv_episodes_id')->comment('FK to tv_episodes.id for the episode.');
$table->integer('imdbid')->unsigned()->nullable()->default('NULL')->index('ix_releases_imdbid');
$table->integer('xxxinfo_id')->default(0)->index('ix_releases_xxxinfo_id');
$table->integer('musicinfo_id')->nullable()->default('NULL')->comment('FK to musicinfo.id');
$table->integer('consoleinfo_id')->nullable()->default('NULL')->index('ix_releases_consoleinfo_id')->comment('FK to consoleinfo.id');
$table->integer('gamesinfo_id')->default(0)->index('ix_releases_gamesinfo_id');
$table->integer('bookinfo_id')->nullable()->default('NULL')->index('ix_releases_bookinfo_id')->comment('FK to bookinfo.id');
$table->integer('anidbid')->nullable()->default('NULL')->index('ix_releases_anidbid')->comment('FK to anidb_titles.anidbid');
$table->integer('predb_id')->unsigned()->default(0)->comment('FK to predb.id');
$table->integer('grabs')->unsigned()->default(0);
$table->integer('comments')->default(0);
$table->boolean('passwordstatus')->default(0)->index('ix_releases_passwordstatus');
$table->integer('rarinnerfilecount')->default(0);
$table->boolean('haspreview')->default(0);
$table->boolean('nfostatus')->default(0);
$table->boolean('jpgstatus')->default(0);
$table->boolean('videostatus')->default(0);
$table->boolean('audiostatus')->default(0);
$table->boolean('dehashstatus')->default(0);
$table->boolean('reqidstatus')->default(0);
$table->binary('nzb_guid', 16)->nullable()->default('NULL')->index('ix_releases_nzb_guid');
$table->boolean('nzbstatus')->default(0);
$table->boolean('iscategorized')->default(0);
$table->boolean('isrenamed')->default(0);
$table->boolean('ishashed')->default(0);
$table->boolean('isrequestid')->default(0);
$table->boolean('proc_pp')->default(0);
$table->boolean('proc_sorter')->default(0);
$table->boolean('proc_par2')->default(0);
$table->boolean('proc_nfo')->default(0);
$table->boolean('proc_files')->default(0);
$table->boolean('proc_uid')->default(0);
$table->boolean('proc_srr')->default(0)->comment('Has the release been srr
processed');
$table->boolean('proc_hash16k')->default(0)->comment('Has the release been
hash16k processed');
$table->primary(['id','categories_id']);
$table->index(['groups_id','passwordstatus'], 'ix_releases_groupsid');
$table->index(['postdate','searchname'], 'ix_releases_postdate_searchname');
$table->index(['leftguid','predb_id'], 'ix_releases_leftguid');
$table->index(['musicinfo_id','passwordstatus'], 'ix_releases_musicinfo_id');
$table->index(['predb_id','searchname'], 'ix_releases_predb_id_searchname');
$table->index(['haspreview','passwordstatus'], 'ix_releases_haspreview_passwordstatus');
$table->index(['nfostatus','size'], 'ix_releases_nfostatus');
$table->index(['dehashstatus','ishashed'], 'ix_releases_dehashstatus');
$table->index(['adddate','reqidstatus','isrequestid'], 'ix_releases_reqidstatus');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('releases');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateRoleExcludedCategoriesTable extends Migration
{
/**
* Run the migrations.
*
@@ -15,10 +15,14 @@ class CreateRoleExcludedCategoriesTable extends Migration
{
Schema::create('role_excluded_categories', function (Blueprint $table) {
$table->increments('id');
$table->integer('role');
$table->integer('categories_id')->nullable()->default('NULL');
$table->timestamps();
$table->unique(['role','categories_id'], 'ix_roleexcat_rolecat');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +30,6 @@ class CreateRoleExcludedCategoriesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('role_excluded_categories');
Schema::drop('role_excluded_categories');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function (Blueprint $table) {
$table->string('section', 25)->default('\'\'');
$table->string('subsection', 25)->default('\'\'');
$table->string('name', 25)->default('\'\'');
$table->string('value', 1000)->default('\'\'');
$table->text('hint', 65535);
$table->string('setting', 64)->default('\'\'')->unique('ui_settings_setting');
$table->primary(['section','subsection','name']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSharingSitesTable extends Migration
{
/**
* Run the migrations.
*
@@ -15,10 +15,16 @@ class CreateSharingSitesTable extends Migration
{
Schema::create('sharing_sites', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('site_name')->default('\'\'');
$table->string('site_guid', 40)->default('\'\'');
$table->dateTime('last_time')->nullable()->default('NULL');
$table->dateTime('first_time')->nullable()->default('NULL');
$table->boolean('enabled')->default(0);
$table->integer('comments')->unsigned()->default(0);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +32,6 @@ class CreateSharingSitesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('sharing_sites');
Schema::drop('sharing_sites');
}
}
@@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSharingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sharing', function (Blueprint $table) {
$table->string('site_guid', 40)->default('\'\'')->primary();
$table->string('site_name')->default('\'\'');
$table->string('username')->default('\'\'');
$table->boolean('enabled')->default(0);
$table->boolean('posting')->default(0);
$table->boolean('fetching')->default(1);
$table->boolean('auto_enable')->default(1);
$table->boolean('start_position')->default(0);
$table->boolean('hide_users')->default(1);
$table->bigInteger('last_article')->unsigned()->default(0);
$table->integer('max_push')->unsigned()->default(40);
$table->integer('max_download')->unsigned()->default(150);
$table->integer('max_pull')->unsigned()->default(20000);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('sharing');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateShortGroupsTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,15 @@ class CreateShortGroupsTable extends Migration
public function up()
{
Schema::create('short_groups', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('id', true);
$table->string('name')->default('\'\'')->index('ix_shortgroups_name');
$table->bigInteger('first_record')->unsigned()->default(0);
$table->bigInteger('last_record')->unsigned()->default(0);
$table->dateTime('updated')->nullable()->default('NULL');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +30,6 @@ class CreateShortGroupsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('short_groups');
Schema::drop('short_groups');
}
}
@@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSpotnabsourcesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('spotnabsources', function (Blueprint $table) {
$table->bigInteger('id', true)->unsigned();
$table->string('username', 64)->default('\'nntp\'');
$table->string('useremail', 128)->default('\'spot@nntp.com\'');
$table->string('usenetgroup', 64)->default('\'alt.binaries.backup\'');
$table->string('publickey', 512);
$table->boolean('active')->default(0);
$table->string('description')->nullable()->default('\'\'');
$table->dateTime('lastupdate')->nullable()->default('NULL');
$table->dateTime('lastbroadcast')->nullable()->default('NULL');
$table->bigInteger('lastarticle')->unsigned()->default(0);
$table->dateTime('dateadded')->nullable()->default('NULL');
$table->unique(['username','useremail','usenetgroup'], 'spotnabsources_ix1');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('spotnabsources');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSteamAppsTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,11 +14,13 @@ class CreateSteamAppsTable extends Migration
public function up()
{
Schema::create('steam_apps', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('name')->default('\'\'')->index('ix_name_ft')->comment('Steam application name');
$table->integer('appid')->unsigned()->comment('Steam application id');
$table->primary(['appid','name']);
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +28,6 @@ class CreateSteamAppsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('steam_apps');
Schema::drop('steam_apps');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBinariesTable extends Migration
class CreateTmuxTable extends Migration
{
/**
* Run the migrations.
*
@@ -13,12 +13,15 @@ class CreateBinariesTable extends Migration
*/
public function up()
{
Schema::create('binaries', function (Blueprint $table) {
Schema::create('tmux', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('setting', 64)->unique('ix_tmux_setting');
$table->string('value', 19000)->nullable()->default('NULL');
$table->dateTime('updateddate')->default('current_timestamp()');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +29,6 @@ class CreateBinariesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('binaries');
Schema::drop('tmux');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTvEpisodesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tv_episodes', function (Blueprint $table) {
$table->increments('id');
$table->integer('videos_id')->unsigned()->comment('FK to videos.id of the parent series.');
$table->smallInteger('series')->unsigned()->default(0)->comment('Number of series/season.');
$table->smallInteger('episode')->unsigned()->default(0)->comment('Number of episode within series');
$table->string('se_complete', 10)->comment('String version of Series/Episode as taken from release subject (i.e. S02E21+22).');
$table->string('title', 180)->comment('Title of the episode.');
$table->date('firstaired')->comment('Date of original airing/release.');
$table->text('summary', 65535)->comment('Description/summary of the episode.');
$table->unique(['videos_id','series','episode','firstaired'], 'videos_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('tv_episodes');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTvInfoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tv_info', function (Blueprint $table) {
$table->integer('videos_id')->unsigned()->default(0)->primary()->comment('FK to video.id');
$table->text('summary', 65535)->comment('Description/summary of the show.');
$table->string('publisher', 50)->comment('The channel/network of production/release (ABC, BBC, Showtime, etc.).');
$table->string('localzone', 50)->default('\'\'')->comment('The linux tz style identifier');
$table->boolean('image')->default(0)->index('ix_tv_info_image')->comment('Does the video have a cover image?');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('tv_info');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUpcomingReleasesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('upcoming_releases', function (Blueprint $table) {
$table->integer('id', true);
$table->string('source', 20);
$table->integer('typeid');
$table->text('info', 65535)->nullable()->default('NULL');
$table->dateTime('updateddate')->default('current_timestamp()');
$table->unique(['source','typeid'], 'ix_upcoming_source');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('upcoming_releases');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUserDownloadsTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,17 +14,15 @@ class CreateUserDownloadsTable extends Migration
public function up()
{
Schema::create('user_downloads', function (Blueprint $table) {
$table->engine = 'innodb';
$table->increments('id');
$table->unsignedInteger('users_id');
$table->integer('users_id')->unsigned()->index('userid');
$table->string('hosthash', 50);
$table->dateTime('timestamp');
$table->dateTime('timestamp')->index('timestamp');
$table->integer('releases_id')->comment('FK to releases.id');
$table->index('users_id', 'ix_users_id');
$table->index('timestamp', 'ix_timestamp');
});
}
/**
* Reverse the migrations.
*
@@ -32,6 +30,6 @@ class CreateUserDownloadsTable extends Migration
*/
public function down()
{
Schema::dropIfExists('user_downloads');
Schema::drop('user_downloads');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUserExcludedCategoriesTable extends Migration
{
/**
* Run the migrations.
*
@@ -15,10 +15,14 @@ class CreateUserExcludedCategoriesTable extends Migration
{
Schema::create('user_excluded_categories', function (Blueprint $table) {
$table->increments('id');
$table->integer('users_id')->unsigned();
$table->integer('categories_id');
$table->timestamps();
$table->unique(['users_id','categories_id'], 'ix_userexcat_usercat');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +30,6 @@ class CreateUserExcludedCategoriesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('user_excluded_categories');
Schema::drop('user_excluded_categories');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUserMoviesTable extends Migration
{
/**
* Run the migrations.
*
@@ -15,10 +15,15 @@ class CreateUserMoviesTable extends Migration
{
Schema::create('user_movies', function (Blueprint $table) {
$table->increments('id');
$table->integer('users_id')->unsigned();
$table->integer('imdbid')->unsigned()->nullable()->default('NULL');
$table->string('categories', 64)->nullable()->default('NULL')->comment('List of categories for user movies');
$table->timestamps();
$table->index(['users_id','imdbid'], 'ix_usermovies_userid');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +31,6 @@ class CreateUserMoviesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('user_movies');
Schema::drop('user_movies');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateVideoAliasesTable extends Migration
class CreateUserRequestsTable extends Migration
{
/**
* Run the migrations.
*
@@ -13,12 +13,16 @@ class CreateVideoAliasesTable extends Migration
*/
public function up()
{
Schema::create('video_aliases', function (Blueprint $table) {
Schema::create('user_requests', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('users_id')->unsigned()->index('userid');
$table->string('hosthash', 50);
$table->string('request');
$table->dateTime('timestamp')->index('timestamp');
});
}
/**
* Reverse the migrations.
*
@@ -26,6 +30,6 @@ class CreateVideoAliasesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('video_aliases');
Schema::drop('user_requests');
}
}
@@ -1,11 +1,11 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUserRolesTable extends Migration
{
/**
* Run the migrations.
*
@@ -14,17 +14,18 @@ class CreateUserRolesTable extends Migration
public function up()
{
Schema::create('user_roles', function (Blueprint $table) {
$table->increments('id');
$table->integer('id', true);
$table->string('name', 32);
$table->unsignedInteger('apirequests');
$table->unsignedInteger('downloadrequests');
$table->unsignedInteger('defaultinvites');
$table->tinyInteger('isdefault');
$table->tinyInteger('cabpreview');
$table->tinyInteger('hideads');
$table->integer('apirequests')->unsigned();
$table->integer('downloadrequests')->unsigned();
$table->integer('defaultinvites')->unsigned();
$table->boolean('isdefault')->default(0);
$table->boolean('canpreview')->default(0);
$table->boolean('hideads')->default(0);
});
}
/**
* Reverse the migrations.
*
@@ -32,6 +33,6 @@ class CreateUserRolesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('user_roles');
Schema::drop('user_roles');
}
}

Some files were not shown because too many files have changed in this diff Show More