diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2018-02-03 16:52:53 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2018-02-03 16:52:53 +0100 |
| commit | 8f97ddf3dd6c367f4b635a87345c3a1b7a26a093 (patch) | |
| tree | 24a2e629c470b33760de541e75a9500161dca57d | |
| download | migrations-8f97ddf3dd6c367f4b635a87345c3a1b7a26a093.tar.gz migrations-8f97ddf3dd6c367f4b635a87345c3a1b7a26a093.zip | |
import from gamessocial
137 files changed, 11425 insertions, 0 deletions
diff --git a/migrations/.gitignore b/migrations/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/migrations/.gitignore diff --git a/migrations/2017_03_30_000000_create_build_table.php b/migrations/2017_03_30_000000_create_build_table.php new file mode 100644 index 0000000..6d14693 --- /dev/null +++ b/migrations/2017_03_30_000000_create_build_table.php @@ -0,0 +1,38 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateBuildTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('build', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + $table->string('item_1')->nullable(); + $table->string('item_2')->nullable(); + $table->string('item_3')->nullable(); + $table->string('item_4')->nullable(); + $table->string('item_5')->nullable(); + $table->string('item_6')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('build'); + } +} diff --git a/migrations/2017_03_30_000000_create_filters_table.php b/migrations/2017_03_30_000000_create_filters_table.php new file mode 100644 index 0000000..2ae60af --- /dev/null +++ b/migrations/2017_03_30_000000_create_filters_table.php @@ -0,0 +1,35 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateFiltersTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('filter', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + $table->string('dimension_on'); // hero, player, participant + $table->string('filter'); // JSON + $table->string('filter_hash'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('filter'); + } +} diff --git a/migrations/2017_03_30_000000_create_game_mode_table.php b/migrations/2017_03_30_000000_create_game_mode_table.php new file mode 100644 index 0000000..d1f58f4 --- /dev/null +++ b/migrations/2017_03_30_000000_create_game_mode_table.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateGameModeTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('game_mode', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name', 25)->unique(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('game_mode'); + } +} diff --git a/migrations/2017_03_30_000000_create_gamer_table.php b/migrations/2017_03_30_000000_create_gamer_table.php new file mode 100644 index 0000000..50e80e0 --- /dev/null +++ b/migrations/2017_03_30_000000_create_gamer_table.php @@ -0,0 +1,45 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +/** +* Will hold the player's core profile. +* Data in this will be populated only when a user logs onto the site +* and generated a profile. We don't need to keep data for every single user +* as many may never visit the same. +*/ +class CreateGamerTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('gamer', function (Blueprint $table) { + $table->increments('id'); + $table->string('player_api_id')->index(); // FK to player's table + + $table->string('name')->index(); + $table->string('vainsocial_status')->nullable(); // regular, fan, etc. + + $table->string('vainglory_ign')->nullable(); + $table->string('vainglory_shard_id')->nullable(); + $table->boolean('vainglory_is_pro')->nullable(); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('gamer'); + } +} diff --git a/migrations/2017_03_30_000000_create_hero_core_stats_table.php b/migrations/2017_03_30_000000_create_hero_core_stats_table.php new file mode 100644 index 0000000..060b9ed --- /dev/null +++ b/migrations/2017_03_30_000000_create_hero_core_stats_table.php @@ -0,0 +1,44 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateHeroCoreStatsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('hero_core_stats', function (Blueprint $table) { + $table->increments('id'); + $table->timestamps(); + + $table->string("series"); + + $table->double("hp"); + $table->double("energy"); + $table->double("weapon_damage"); + $table->double("attack_speed"); + $table->double("armor"); + $table->double("shield"); + $table->double("attack_range"); + $table->double("move_speed"); + $table->double("hp_regen"); + $table->double("ep_regen"); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('hero_core_stats'); + } +} diff --git a/migrations/2017_03_30_000000_create_item_table.php b/migrations/2017_03_30_000000_create_item_table.php new file mode 100644 index 0000000..2533f51 --- /dev/null +++ b/migrations/2017_03_30_000000_create_item_table.php @@ -0,0 +1,38 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateItemTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('item', function (Blueprint $table) { + $table->increments('id'); + $table->timestamps(); + + $table->string('api_id'); + $table->string("series"); + + $table->string("name"); + $table->string("active")->nullable(); + $table->string("passive")->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('item'); + } +} diff --git a/migrations/2017_03_30_000000_create_keys_table.php b/migrations/2017_03_30_000000_create_keys_table.php new file mode 100644 index 0000000..f4d1acf --- /dev/null +++ b/migrations/2017_03_30_000000_create_keys_table.php @@ -0,0 +1,38 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +/** +* Key/Value pairs +*/ +class CreateKeysTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('keys', function (Blueprint $table) { + $table->increments('id'); + $table->timestamps(); + + $table->string('type'); + $table->string('key'); + $table->string('value'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('keys'); + } +} diff --git a/migrations/2017_03_30_000000_create_match_table.php b/migrations/2017_03_30_000000_create_match_table.php new file mode 100644 index 0000000..f049e9b --- /dev/null +++ b/migrations/2017_03_30_000000_create_match_table.php @@ -0,0 +1,45 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + + +/** +* Represents the Matches. Some of the data will be Raw Data +* and some will be computed. +*/ +class CreateMatchTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('match', function (Blueprint $table) { + $table->increments('id'); + + // foreign key + $table->string('shard_id'); + $table->uuid('api_id')->unique(); + + $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); + $table->unsignedSmallInteger('duration'); + $table->string('game_mode', 16); + $table->string('end_game_reason', 16); + $table->string('queue', 16); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('match'); + } +} diff --git a/migrations/2017_03_30_000000_create_region_table.php b/migrations/2017_03_30_000000_create_region_table.php new file mode 100644 index 0000000..70a4e7b --- /dev/null +++ b/migrations/2017_03_30_000000_create_region_table.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateRegionTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('region', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('region'); + } +} diff --git a/migrations/2017_03_30_000000_create_role_table.php b/migrations/2017_03_30_000000_create_role_table.php new file mode 100644 index 0000000..0fe7d7b --- /dev/null +++ b/migrations/2017_03_30_000000_create_role_table.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateRoleTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('role', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('role'); + } +} diff --git a/migrations/2017_03_30_000000_create_roster_table.php b/migrations/2017_03_30_000000_create_roster_table.php new file mode 100644 index 0000000..bc21494 --- /dev/null +++ b/migrations/2017_03_30_000000_create_roster_table.php @@ -0,0 +1,46 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateRosterTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('roster', function (Blueprint $table) { + $table->increments('id')->unique(); + + // uuid + $table->string('shard_id'); + $table->uuid('api_id')->unique(); + + // foreign key + $table->uuid('match_api_id')->index(); + + $table->unsignedSmallInteger('aces_earned'); + $table->unsignedMediumInteger('gold'); + $table->unsignedSmallInteger('hero_kills'); + $table->unsignedSmallInteger('kraken_captures'); + $table->string('side', 16); + $table->unsignedSmallInteger('turret_kills'); + $table->unsignedSmallInteger('turrets_remaining'); + $table->boolean('winner'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('roster'); + } +} diff --git a/migrations/2017_03_30_000000_create_series_table.php b/migrations/2017_03_30_000000_create_series_table.php new file mode 100644 index 0000000..4b3adb9 --- /dev/null +++ b/migrations/2017_03_30_000000_create_series_table.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateSeriesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('series', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + $table->string('dimension_on'); + $table->timestamp('start')->nullable(); + $table->timestamp('end')->nullable(); + $table->boolean('currentPatch')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('series'); + } +} diff --git a/migrations/2017_03_30_000000_create_skill_tier_table.php b/migrations/2017_03_30_000000_create_skill_tier_table.php new file mode 100644 index 0000000..c193feb --- /dev/null +++ b/migrations/2017_03_30_000000_create_skill_tier_table.php @@ -0,0 +1,34 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateSkilltierTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('skill_tier', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + $table->smallInteger('start'); + $table->smallInteger('end'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('skill_tier'); + } +} diff --git a/migrations/2017_03_30_000001_create_asset_table.php b/migrations/2017_03_30_000001_create_asset_table.php new file mode 100644 index 0000000..b5546a5 --- /dev/null +++ b/migrations/2017_03_30_000001_create_asset_table.php @@ -0,0 +1,42 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateAssetTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('asset', function (Blueprint $table) { + $table->increments('id'); + $table->uuid('api_id')->unique(); + + // foreign key + $table->string('shard_id'); + $table->uuid('match_api_id')->index(); + + $table->string('name', 16); + $table->string('url'); + $table->string('content_type', 32); + $table->timestamp('created_at'); + $table->string('description'); + $table->string('filename', 32); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('asset'); + } +} diff --git a/migrations/2017_03_30_000005_create_player_table.php b/migrations/2017_03_30_000005_create_player_table.php new file mode 100644 index 0000000..55fcedf --- /dev/null +++ b/migrations/2017_03_30_000005_create_player_table.php @@ -0,0 +1,52 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +/** +* Will hold the player's core profile. +* Data in this will be populated only when a user logs onto the site +* and generated a profile. We don't need to keep data for every single user +* as many may never visit the same. +*/ +class CreatePlayerTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('player', function (Blueprint $table) { + $table->increments('id'); + + // uuid + $table->string('shard_id'); + $table->uuid('api_id')->unique(); + + // meta + $table->string('name')->index(); + $table->timestamp('last_match_created_date')->nullable(); + $table->timestamp('last_update')->nullable(); + + // stats from api + $table->timestamp('created_at')->nullable(); + $table->integer('level'); + $table->integer('xp'); + $table->float('lifetime_gold'); + $table->smallInteger('skill_tier')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('player'); + } +} diff --git a/migrations/2017_03_30_000040_create_hero_table.php b/migrations/2017_03_30_000040_create_hero_table.php new file mode 100644 index 0000000..1e84ad4 --- /dev/null +++ b/migrations/2017_03_30_000040_create_hero_table.php @@ -0,0 +1,50 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateHeroTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('hero', function (Blueprint $table) { + $table->increments('id'); + $table->timestamps(); + + $table->string("added_in_patch"); + + $table->string("name"); + $table->string("api_name"); + $table->boolean("is_assassin"); + $table->boolean("is_mage"); + $table->boolean("is_protector"); + $table->boolean("is_sniper"); + $table->boolean("is_warrior"); + $table->boolean("is_carry"); + $table->boolean("is_jungler"); + $table->boolean("is_captain"); + + $table->string("heroic_perk"); + $table->string("ability_a"); + $table->string("ability_b"); + $table->string("ability_c"); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('hero'); + } +} diff --git a/migrations/2017_03_30_000051_create_participant_table.php b/migrations/2017_03_30_000051_create_participant_table.php new file mode 100644 index 0000000..ab3d1bb --- /dev/null +++ b/migrations/2017_03_30_000051_create_participant_table.php @@ -0,0 +1,57 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateParticipantTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('participant', function (Blueprint $table) { + $table->increments('id'); + + // uuid + $table->string('shard_id'); + $table->uuid('api_id')->unique(); + + // relationships + $table->uuid('player_api_id')->index(); + $table->uuid('roster_api_id')->index(); + $table->uuid('match_api_id')->index(); + + // mappings + $table->unsignedInteger('hero_id')->index(); + $table->unsignedInteger('series_id')->index(); + $table->unsignedInteger('game_mode_id')->index(); + $table->unsignedInteger('role_id')->index(); + $table->unsignedInteger('filter_id')->index(); + + // API data + $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); + $table->string('actor', 16); + $table->double('first_afk_time', 12, 4); + $table->unsignedTinyInteger('karma_level'); + $table->unsignedTinyInteger('level'); + $table->smallInteger('skill_tier'); + $table->string('skin_key', 40); + $table->boolean('went_afk'); + $table->boolean('winner'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('participant'); + } +} diff --git a/migrations/2017_03_30_000052_create_player_point_table.php b/migrations/2017_03_30_000052_create_player_point_table.php new file mode 100644 index 0000000..de4cbb4 --- /dev/null +++ b/migrations/2017_03_30_000052_create_player_point_table.php @@ -0,0 +1,96 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreatePlayerPointTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('player_point', function (Blueprint $table) { + $table->increments('id'); + + // foreign key + $table->uuid('player_api_id')->index(); + + $table->unsignedBigInteger('series_id')->index(); + $table->unsignedBigInteger('filter_id')->index(); + $table->unsignedBigInteger('hero_id')->index(); + $table->unsignedBigInteger('game_mode_id')->index(); + $table->unsignedBigInteger('role_id')->index(); + + // sums + $table->integer('played')->nullable(); + $table->integer('wins')->nullable(); + $table->integer('time_spent')->nullable(); + + // combination of dimensions is unique + $table->unique(['player_api_id', 'series_id', 'filter_id', 'hero_id', 'game_mode_id'], 'player_point_in_space'); + + $table->dateTimeTz('updated_at'); + + + // stats: this is the same as participant_stats + $table->unsignedInteger('kills')->nullable(); + $table->unsignedInteger('deaths')->nullable(); + $table->unsignedInteger('assists')->nullable(); + $table->unsignedInteger('minion_kills')->nullable(); + $table->unsignedInteger('jungle_kills')->nullable(); + $table->unsignedInteger('non_jungle_minion_kills')->nullable(); + $table->unsignedInteger('crystal_mine_captures')->nullable(); + $table->unsignedInteger('gold_mine_captures')->nullable(); + $table->unsignedInteger('kraken_captures')->nullable(); + $table->unsignedInteger('turret_captures')->nullable(); + $table->unsignedInteger('gold')->nullable(); + + $table->unsignedInteger('hero_level')->nullable(); // only via Telemetry! + + // traits + // helpers + $table->double('kda_ratio', 10, 5)->nullable(); + $table->double('kill_participation', 10, 5)->nullable(); + $table->double('cs_per_min', 14, 5)->nullable(); + $table->double('kills_per_min', 12, 5)->nullable(); + // shared + $table->unsignedInteger('impact_score')->nullable(); + $table->unsignedInteger('objective_score')->nullable(); + $table->unsignedInteger('damage_cp_score')->nullable(); // c & j + $table->unsignedInteger('damage_wp_score')->nullable(); // c & j + $table->unsignedInteger('sustain_score')->nullable(); // j & cpt + // carry + $table->unsignedInteger('farm_lane_score')->nullable(); + $table->unsignedInteger('kill_score')->nullable(); + $table->unsignedInteger('objective_lane_score')->nullable(); + // jungler + $table->unsignedInteger('farm_jungle_score')->nullable(); + $table->unsignedInteger('peel_score')->nullable(); + $table->unsignedInteger('kill_assist_score')->nullable(); + $table->unsignedInteger('objective_jungle_score')->nullable(); // gold mine, sentry, Kraken + // captain + $table->unsignedInteger('vision_score')->nullable(); + $table->unsignedInteger('heal_score')->nullable(); + $table->unsignedInteger('assist_score')->nullable(); + $table->unsignedInteger('utility_score')->nullable(); + // meta + $table->unsignedInteger('synergy_score')->nullable(); + $table->unsignedInteger('build_score')->nullable(); + $table->unsignedInteger('offmeta_score')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('player_point'); + } +} diff --git a/migrations/2017_03_30_000053_create_participant_stats_table.php b/migrations/2017_03_30_000053_create_participant_stats_table.php new file mode 100644 index 0000000..3b8a585 --- /dev/null +++ b/migrations/2017_03_30_000053_create_participant_stats_table.php @@ -0,0 +1,85 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateParticipantStatsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('participant_stats', function (Blueprint $table) { + $table->increments('id'); + //$table->timestamp('updated_at'); + $table->timestamps(); + $table->boolean('final')->default(true); + + // foreign key: api id + $table->uuid('participant_api_id')->index(); + + // snapshot stats + //$table->timestamp('created_at'); + $table->unsignedSmallInteger('kills')->nullable(); + $table->unsignedSmallInteger('deaths')->nullable(); + $table->unsignedSmallInteger('assists')->nullable(); + $table->unsignedMediumInteger('farm')->nullable(); + $table->unsignedSmallInteger('minion_kills')->nullable(); + $table->unsignedSmallInteger('jungle_kills')->nullable(); + $table->unsignedSmallInteger('non_jungle_minion_kills')->nullable(); + $table->unsignedSmallInteger('crystal_mine_captures')->nullable(); + $table->unsignedSmallInteger('gold_mine_captures')->nullable(); + $table->unsignedSmallInteger('kraken_captures')->nullable(); + $table->unsignedSmallInteger('turret_captures')->nullable(); + $table->unsignedMediumInteger('gold')->nullable(); + + $table->unsignedTinyInteger('hero_level')->nullable(); // only via Telemetry! + + // traits + $table->double('kda_ratio', 5, 5)->nullable(); + $table->double('kill_participation', 5, 5)->nullable(); + $table->double('cs_per_min', 7, 5)->nullable(); + $table->double('kills_per_min', 6, 5)->nullable(); + // scores - all int between 0 and 100 + // shared + $table->double('impact_score')->nullable(); + $table->double('objective_score')->nullable(); + $table->double('damage_cp_score')->nullable(); // c & j + $table->double('damage_wp_score')->nullable(); // c & j + $table->double('sustain_score')->nullable(); // j & cpt + // carry + $table->double('farm_lane_score')->nullable(); + $table->double('kill_score')->nullable(); + $table->double('objective_lane_score')->nullable(); + // jungler + $table->double('farm_jungle_score')->nullable(); + $table->double('peel_score')->nullable(); + $table->double('kill_assist_score')->nullable(); + $table->double('objective_jungle_score')->nullable(); // gold mine, sentry, Kraken + // captain + $table->double('vision_score')->nullable(); + $table->double('heal_score')->nullable(); + $table->double('assist_score')->nullable(); + $table->double('utility_score')->nullable(); + // meta + $table->double('synergy_score')->nullable(); + $table->double('build_score')->nullable(); + $table->double('offmeta_score')->nullable(); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('participant_stats'); + } +} diff --git a/migrations/2017_03_30_000100_create_global_point_table.php b/migrations/2017_03_30_000100_create_global_point_table.php new file mode 100644 index 0000000..785fe40 --- /dev/null +++ b/migrations/2017_03_30_000100_create_global_point_table.php @@ -0,0 +1,99 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateGlobalPointTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('global_point', function (Blueprint $table) { + $table->increments('id'); + $table->dateTimeTz('updated_at'); + + // links - core dimensions + // meta + $table->bigInteger('series_id')->index(); // when + $table->bigInteger('filter_id')->index(); // custom + + // links - additional dimensions + // attributes + $table->bigInteger('hero_id')->index(); + $table->bigInteger('game_mode_id')->index(); + $table->bigInteger('skill_tier_id')->index(); + $table->bigInteger('build_id')->nullable()->index(); + $table->bigInteger('role_id')->nullable()->index(); + $table->bigInteger('region_id')->nullable()->index(); + + $table->unique(['series_id', 'filter_id', 'hero_id', 'game_mode_id', 'skill_tier_id', 'build_id', 'role_id', 'region_id'], 'global_point_in_space'); + + // same as player_point + // sums + $table->bigInteger('played')->nullable(); + $table->bigInteger('wins')->nullable(); + $table->bigInteger('time_spent')->nullable(); + + // stats: this is the same as participant_stats + // but sums (stats) and averages (traits) + $table->unsignedBigInteger('kills')->nullable(); + $table->unsignedBigInteger('deaths')->nullable(); + $table->unsignedBigInteger('assists')->nullable(); + $table->unsignedBigInteger('minion_kills')->nullable(); + $table->unsignedBigInteger('jungle_kills')->nullable(); + $table->unsignedBigInteger('non_jungle_minion_kills')->nullable(); + $table->unsignedBigInteger('crystal_mine_captures')->nullable(); + $table->unsignedBigInteger('gold_mine_captures')->nullable(); + $table->unsignedBigInteger('kraken_captures')->nullable(); + $table->unsignedBigInteger('turret_captures')->nullable(); + $table->unsignedBigInteger('gold')->nullable(); + + // traits + // helpers + $table->double('kda_ratio', 20, 5)->nullable(); + $table->double('kill_participation', 20, 5)->nullable(); + $table->double('cs_per_min', 20, 5)->nullable(); + $table->double('kills_per_min', 20, 5)->nullable(); + // scores - all int between 0 and 100 + // shared + $table->unsignedBigInteger('impact_score')->nullable(); + $table->unsignedBigInteger('objective_score')->nullable(); + $table->unsignedBigInteger('damage_cp_score')->nullable(); // c & j + $table->unsignedBigInteger('damage_wp_score')->nullable(); // c & j + $table->unsignedBigInteger('sustain_score')->nullable(); // j & cpt + // carry + $table->unsignedBigInteger('farm_lane_score')->nullable(); + $table->unsignedBigInteger('kill_score')->nullable(); + $table->unsignedBigInteger('objective_lane_score')->nullable(); + // jungler + $table->unsignedBigInteger('farm_jungle_score')->nullable(); + $table->unsignedBigInteger('peel_score')->nullable(); + $table->unsignedBigInteger('kill_assist_score')->nullable(); + $table->unsignedBigInteger('objective_jungle_score')->nullable(); // gold mine, sentry, Kraken + // captain + $table->unsignedBigInteger('vision_score')->nullable(); + $table->unsignedBigInteger('heal_score')->nullable(); + $table->unsignedBigInteger('assist_score')->nullable(); + $table->unsignedBigInteger('utility_score')->nullable(); + // meta + $table->unsignedBigInteger('synergy_score')->nullable(); + $table->unsignedBigInteger('build_score')->nullable(); + $table->unsignedBigInteger('offmeta_score')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('global_point'); + } +} diff --git a/migrations/2017_04_00_000000_add_hero_seed.php b/migrations/2017_04_00_000000_add_hero_seed.php new file mode 100644 index 0000000..de0ce20 --- /dev/null +++ b/migrations/2017_04_00_000000_add_hero_seed.php @@ -0,0 +1,667 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddHeroSeed extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'all', + 'api_name' => '*All*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Vox', + 'api_name' => '*Vox*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Celeste', + 'api_name' => '*Celeste*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Catherine', + 'api_name' => '*Catherine*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Ringo', + 'api_name' => '*Ringo*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Adagio', + 'api_name' => '*Adagio*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Koshka', + 'api_name' => '*Koshka*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Glaive', + 'api_name' => '*Glaive*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Petal', + 'api_name' => '*Petal*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'SAW', + 'api_name' => '*SAW*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Krul', + 'api_name' => '*Krul*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Taka', + 'api_name' => '*Taka*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Skaarf', + 'api_name' => '*Skaarf*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Ardan', + 'api_name' => '*Ardan*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Fortress', + 'api_name' => '*Fortress*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Rona', + 'api_name' => '*Rona*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Skye', + 'api_name' => '*Skye*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Phinn', + 'api_name' => '*Phinn*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Blackfeather', + 'api_name' => '*Blackfeather*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Kestrel', + 'api_name' => '*Kestrel*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Reim', + 'api_name' => '*Reim*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Ozo', + 'api_name' => '*Ozo*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Alpha', + 'api_name' => '*Aplha*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Lance', + 'api_name' => '*Lance*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Samuel', + 'api_name' => '*Samuel*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Baron', + 'api_name' => '*Baron*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Gwen', + 'api_name' => '*Gwen*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Flicker', + 'api_name' => '*Flicker*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Idris', + 'api_name' => '*Idris*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Grumpjaw', + 'api_name' => '*Grumpjaw*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Lyra', + 'api_name' => '*Lyra*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Joule', + 'api_name' => '*Joule*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_04_00_000000_add_item_seed.php b/migrations/2017_04_00_000000_add_item_seed.php new file mode 100644 index 0000000..b591b02 --- /dev/null +++ b/migrations/2017_04_00_000000_add_item_seed.php @@ -0,0 +1,452 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddItemSeed extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1063_Item_Aegis*', + 'name' => 'Aegis' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1050_Item_Aftershock*', + 'name' => 'Aftershock' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1069_Item_AlternatingCurrent*', + 'name' => 'Alternating Current' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1057_Item_AtlasPauldron*', + 'name' => 'Atlas Pauldron' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1060_Item_BarbedNeedle*', + 'name' => 'Barbed Needle' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1010_Item_BlazingSalvo*', + 'name' => 'Blazing Salvo' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1039_Item_Bonesaw*', + 'name' => 'Bonesaw' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1059_Item_BookOfEulogies*', + 'name' => 'Book of Eulogies' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1067_Item_BreakingPoint*', + 'name' => 'Breaking Point' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1055_Item_BrokenMyth*', + 'name' => 'Broken Myth' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1028_Item_Chronograph*', + 'name' => 'Chronograph' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1029_Item_Clockwork*', + 'name' => 'Clockwork' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1022_Item_CoatOfPlates*', + 'name' => 'Coat of Plates' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1079_Item_Contraption*', + 'name' => 'Contraption' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1046_Item_Crucible*', + 'name' => 'Crucible' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1003_Item_CrystalBit*', + 'name' => 'Crystal Bit' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1053_Item_CrystalInfusion*', + 'name' => 'Crystal Infusion' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1085_Item_DragonbloodContract*', + 'name' => 'Dragonblood Contract' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1016_Item_Dragonheart*', + 'name' => 'Dragonheart' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1097_Item_Echo*', + 'name' => 'Echo' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1009_Item_EclipsePrism*', + 'name' => 'Eclipse Prism' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1025_Item_EnergyBattery*', + 'name' => 'Energy Battery' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1071_Item_EveOfHarvest*', + 'name' => 'Eve of Harvest' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1038_Item_Flare*', + 'name' => 'Flare' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1088_Item_Flaregun*', + 'name' => 'Flare Gun' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1045_Item_FountainOfRenewal*', + 'name' => 'Fountain of Renewal' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1044_Item_Frostburn*', + 'name' => 'Frostburn' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1087_Item_HalcyonChargers*', + 'name' => 'Halcyon Chargers' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1000_Item_HalcyonPotion*', + 'name' => 'Halcyon Potion' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1072_Item_HeavyPrism*', + 'name' => 'Heavy Prism' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1065_Item_HeavySteel*', + 'name' => 'Heavy Steel' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1026_Item_Hourglass*', + 'name' => 'Hourglass' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1073_Item_IronguardContract*', + 'name' => 'Ironguard Contract' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1047_Item_JourneyBoots*', + 'name' => 'Journey Boots' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1062_Item_KineticShield*', + 'name' => 'Kinetic Shield' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1064_Item_Lifespring*', + 'name' => 'Lifespring' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1017_Item_LightArmor*', + 'name' => 'Light Armor' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1061_Item_LightShield*', + 'name' => 'Light Shield' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1068_Item_LuckyStrike*', + 'name' => 'Lucky Strike' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1024_Item_MetalJacket*', + 'name' => 'Metal Jacket' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1041_Item_MinionCandy*', + 'name' => 'Minion Candy' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1080_Item_MinionsFoot*', + 'name' => 'Minion\'s Foot' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1095_Item_NullwaveGauntlet*', + 'name' => 'Nullwave Gauntlet' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1015_Item_Oakheart*', + 'name' => 'Oakheart' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1070_Item_PiercingShard*', + 'name' => 'Piercing Shard' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1066_Item_PiercingSpear*', + 'name' => 'Piercing Spear' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1092_Item_PoisonedShiv*', + 'name' => 'Poisoned Shiv' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1084_Item_ProtectorContract*', + 'name' => 'Protector Contract' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1043_Item_ReflexBlock*', + 'name' => 'Reflex Block' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1054_Item_ScoutTrap*', + 'name' => 'Scout Trap' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1034_Item_SerpentMask*', + 'name' => 'Serpent Mask' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1013_Item_Shatterglass*', + 'name' => 'Shatterglass' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1042_Item_Shiversteel*', + 'name' => 'Shiversteel' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1005_Item_SixSins*', + 'name' => 'Six Sins' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1105_Item_SlumberingHusk*', + 'name' => 'Slumbering Husk' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1012_Item_Sorrowblade*', + 'name' => 'Sorrowblade' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1030_Item_SprintBoots*', + 'name' => 'Sprint Boots' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1090_Item_Stormcrown*', + 'name' => 'Stormcrown' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1074_Item_StormguardBanner*', + 'name' => 'Stormguard Banner' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1004_Item_SwiftShooter*', + 'name' => 'Swift Shooter' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1035_Item_TensionBow*', + 'name' => 'Tension Bow' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1014_Item_TornadoTrigger*', + 'name' => 'Tornado Trigger' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1032_Item_TravelBoots*', + 'name' => 'Travel Boots' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1049_Item_TyrantsMonocle*', + 'name' => 'Tyrant\'s Monocle' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1027_Item_VoidBattery*', + 'name' => 'Void Battery' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1056_Item_WarTreads*', + 'name' => 'War Treads' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1002_Item_WeaponBlade*', + 'name' => 'Weapon Blade' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1052_Item_WeaponInfusion*', + 'name' => 'Weapon Infusion' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1002_Item_CandyShop_Kissy*', + 'name' => 'Kissy' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1005_Item_CandyShop_Taunt*', + 'name' => 'Taunt' + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1007_Item_CandyShop_VOTaunt*', + 'name' => 'Voice over Taunt' + ]); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_04_16_194552_FixPlayerPointIndex.php b/migrations/2017_04_16_194552_FixPlayerPointIndex.php new file mode 100644 index 0000000..f4d3b8d --- /dev/null +++ b/migrations/2017_04_16_194552_FixPlayerPointIndex.php @@ -0,0 +1,34 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class FixPlayerPointIndex extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('player_point', function (Blueprint $table) { + $table->dropUnique('player_point_in_space'); + $table->unique(['player_api_id', 'series_id', 'filter_id', 'hero_id', 'game_mode_id', 'role_id'], 'player_point_in_space'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('player_point', function (Blueprint $table) { + $table->dropUnique('player_point_in_space'); + $table->unique(['player_api_id', 'series_id', 'filter_id', 'hero_id', 'game_mode_id'], 'player_point_in_space'); + }); + } +} diff --git a/migrations/2017_04_18_083819_Fix_Participant_Stats_Index.php b/migrations/2017_04_18_083819_Fix_Participant_Stats_Index.php new file mode 100644 index 0000000..3d1ef27 --- /dev/null +++ b/migrations/2017_04_18_083819_Fix_Participant_Stats_Index.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class FixParticipantStatsIndex extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_stats', function (Blueprint $table) { + // combination of dimensions is unique + $table->unique(['participant_api_id', 'created_at']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant_stats', function (Blueprint $table) { + // combination of dimensions is unique + $table->dropUnique(['participant_api_id', 'created_at']); + }); + } +} + + diff --git a/migrations/2017_04_20_082703_Fix_Hero_Names.php b/migrations/2017_04_20_082703_Fix_Hero_Names.php new file mode 100644 index 0000000..cbc7482 --- /dev/null +++ b/migrations/2017_04_20_082703_Fix_Hero_Names.php @@ -0,0 +1,31 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class FixHeroNames extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('hero', function(Blueprint $table){ + $sql = 'update hero set api_name = "*Alpha*" where api_name = "*Aplha*"'; + DB::connection()->getPdo()->exec($sql); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_20_082710_Add_Gamers.php b/migrations/2017_04_20_082710_Add_Gamers.php new file mode 100644 index 0000000..2f443d3 --- /dev/null +++ b/migrations/2017_04_20_082710_Add_Gamers.php @@ -0,0 +1,54 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddGamers extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('gamer')->insert([ + 'player_api_id' => 'f2ae3a92-b7bc-11e4-9728-06d90c28bf1a', + 'name' => 'odds', + 'vainsocial_status' => 'supporter', + 'vainglory_ign' => 'odds', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => 'c57206b6-827a-11e4-8283-06eb725f8a76', + 'name' => 'Brian', + 'vainsocial_status' => 'supporter', + 'vainglory_ign' => 'Brian', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => 'f8782f7a-f9cb-11e6-b3f3-029cb633549e', + 'name' => 'ImmortalDhruv', + 'vainsocial_status' => 'supporter', + 'vainglory_ign' => 'ImmortalDhruv', + 'vainglory_shard_id' => 'sg', + 'vainglory_is_pro' => false, + ]); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_22_064845_AddGamer.php b/migrations/2017_04_22_064845_AddGamer.php new file mode 100644 index 0000000..46f86e8 --- /dev/null +++ b/migrations/2017_04_22_064845_AddGamer.php @@ -0,0 +1,35 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddGamer extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('gamer')->insert([ + 'player_api_id' => '6eab29f6-eed5-11e6-ba5f-068789513eb5', + 'name' => 'LighteningThief', + 'vainsocial_status' => 'fan', + 'vainglory_ign' => 'LighteningThief', + 'vainglory_shard_id' => 'sg', + 'vainglory_is_pro' => false, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_22_093335_Fix_Participant_Items.php b/migrations/2017_04_22_093335_Fix_Participant_Items.php new file mode 100644 index 0000000..0761373 --- /dev/null +++ b/migrations/2017_04_22_093335_Fix_Participant_Items.php @@ -0,0 +1,33 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class FixParticipantItems extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_stats', function (Blueprint $table) { + $table->string('items')->nullable(); + $table->string('item_uses', 455)->nullable(); + $table->string('item_grants', 455)->nullable(); + $table->string('item_sells', 455)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_24_103635_Modify_Participant_Stats.php b/migrations/2017_04_24_103635_Modify_Participant_Stats.php new file mode 100644 index 0000000..8ca3d32 --- /dev/null +++ b/migrations/2017_04_24_103635_Modify_Participant_Stats.php @@ -0,0 +1,30 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class ModifyParticipantStats extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_stats', function (Blueprint $table) { + $table->unsignedSmallInteger('duration'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_24_110311_Modify_Series_Flag_For_Visible_In_Web.php b/migrations/2017_04_24_110311_Modify_Series_Flag_For_Visible_In_Web.php new file mode 100644 index 0000000..e84f013 --- /dev/null +++ b/migrations/2017_04_24_110311_Modify_Series_Flag_For_Visible_In_Web.php @@ -0,0 +1,30 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class ModifySeriesFlagForVisibleInWeb extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('series', function (Blueprint $table) { + $table->boolean('show_in_web'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_25_000000_add_series_seed.php b/migrations/2017_04_25_000000_add_series_seed.php new file mode 100644 index 0000000..a8a0956 --- /dev/null +++ b/migrations/2017_04_25_000000_add_series_seed.php @@ -0,0 +1,76 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesSeed extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series')->insert([ + 'name' => 'all', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.2', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2017, 3, 27), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.3', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 3, 28), + 'end' => Carbon::createFromDate(2017, 4, 26), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'all', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.2', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2017, 3, 27), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.3', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 3, 28), + 'end' => Carbon::createFromDate(2017, 4, 26), + 'show_in_web' => true + ]); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_04_26_091529_Add_Series_Patch_24.php b/migrations/2017_04_26_091529_Add_Series_Patch_24.php new file mode 100644 index 0000000..8905390 --- /dev/null +++ b/migrations/2017_04_26_091529_Add_Series_Patch_24.php @@ -0,0 +1,50 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch24 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.3') + ->update([ + 'end' => Carbon::createFromDate(2017, 4, 26) + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.4', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 4, 26), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.4', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 4, 26), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_26_094055_Add_Baptiste.php b/migrations/2017_04_26_094055_Add_Baptiste.php new file mode 100644 index 0000000..37fcf47 --- /dev/null +++ b/migrations/2017_04_26_094055_Add_Baptiste.php @@ -0,0 +1,48 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddBaptiste extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Baptiste', + 'api_name' => '*Baptiste*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.4', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_04_27_072542_Create_Users_Table.php b/migrations/2017_04_27_072542_Create_Users_Table.php new file mode 100644 index 0000000..00575f1 --- /dev/null +++ b/migrations/2017_04_27_072542_Create_Users_Table.php @@ -0,0 +1,38 @@ +<?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->uuid('user_token')->index()->nullable(); + $table->uuid('player_api_id')->index()->nullable(); + + $table->string('email')->index(); + $table->string('password'); + $table->string('remember_token')->index()->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +} diff --git a/migrations/2017_04_27_072558_Create_Teams_Table.php b/migrations/2017_04_27_072558_Create_Teams_Table.php new file mode 100644 index 0000000..245a392 --- /dev/null +++ b/migrations/2017_04_27_072558_Create_Teams_Table.php @@ -0,0 +1,42 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTeamsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('team', function (Blueprint $table) { + $table->increments('id'); + + // API values - will be required later + $table->string('shard_id')->nullable(); + $table->uuid('api_id')->nullable(); + $table->timestamp('created_at'); + + $table->unsignedBigInteger('league_id')->nullable()->index(); // FK to tournaments's table + + $table->string('name', 20); + $table->string('identifier', 10); + $table->enum('status', ['planned', 'active', 'inactive']); + $table->enum('type', ['team', 'guild', 'tournament']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('team'); + } +} diff --git a/migrations/2017_04_27_072621_Create_Team_Membership_Table.php b/migrations/2017_04_27_072621_Create_Team_Membership_Table.php new file mode 100644 index 0000000..07ca51f --- /dev/null +++ b/migrations/2017_04_27_072621_Create_Team_Membership_Table.php @@ -0,0 +1,38 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTeamMembershipTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('team_membership', function (Blueprint $table) { + $table->increments('id'); + + $table->uuid('player_api_id'); // player who is part of the guild/team + $table->bigInteger('user_id')->nullable(); // User ID FK to ensure authenticity. Discord will send us the id. + + $table->unsignedSmallInteger('team_id'); // Id for the team (once we have API we will replace with UUID). + $table->timestamp('joined_on'); // date whe teh player was added to team. + $table->enum('status', ['pending', 'initiate', 'member', 'officer', 'leader', 'former', 'veteran']); + $table->bigInteger('fame'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('team_membership'); + } +} diff --git a/migrations/2017_04_27_143720_Create_Tournament_Table.php b/migrations/2017_04_27_143720_Create_Tournament_Table.php new file mode 100644 index 0000000..c76396d --- /dev/null +++ b/migrations/2017_04_27_143720_Create_Tournament_Table.php @@ -0,0 +1,40 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('tournament', function (Blueprint $table) { + $table->increments('id'); + $table->string('api_id')->nullable(); // tournament ID - assuming we get it some day from API + + $table->string('name'); + $table->string('tag_line_1')->nullable(); + $table->string('tag_line_2')->nullable(); + $table->enum('status', ['planned', 'active', 'finished']); + + $table->enum('type', ['players', 'team']); + $table->timestampTz('start')->nullable(); + $table->timestampTz('end')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tournament'); + } +} diff --git a/migrations/2017_04_27_143725_Create_Tournament_Participants_Table.php b/migrations/2017_04_27_143725_Create_Tournament_Participants_Table.php new file mode 100644 index 0000000..0615b99 --- /dev/null +++ b/migrations/2017_04_27_143725_Create_Tournament_Participants_Table.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentParticipantsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('tournament_participants', function (Blueprint $table) { + $table->increments('id'); + + $table->unsignedBigInteger('league_id')->index(); // FK to tournaments's table + $table->unsignedBigInteger('team_id')->index(); // FK to tournament team's table + $table->unsignedBigInteger('role_id')->index(); // FK to tournament team's table + + $table->uuid('player_api_id')->index(); // FK to player's API id + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tournament_participants'); + } +} diff --git a/migrations/2017_05_05_065624_Insert_Pro_Players_For_Feeds.php b/migrations/2017_05_05_065624_Insert_Pro_Players_For_Feeds.php new file mode 100644 index 0000000..f5d623f --- /dev/null +++ b/migrations/2017_05_05_065624_Insert_Pro_Players_For_Feeds.php @@ -0,0 +1,1151 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class InsertProPlayersForFeeds extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'BestChuckNa', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'BestChuckNa', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'FlashX', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'FlashX', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'VONC', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'VONC', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Aloh4', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Aloh4', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Vains', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Vains', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'StartingAllOver', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'StartingAllOver', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'StartingAllOver', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'StartingAllOver', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'StartingAllOver', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'StartingAllOver', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ttigers', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ttigers', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Chicken', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Chicken', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ShinKaigan', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ShinKaigan', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Nivmett', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Nivmett', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Gary', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Gary', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Status', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Status', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'martohhh', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'martohhh', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'e36', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'e36', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'PONtheoriginal', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'PONtheoriginal', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'gabevizzle', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'gabevizzle', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'iLoveJoseph', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'iLoveJoseph', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Oldskool', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Oldskool', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Sibs', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Sibs', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Hami', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Hami', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'eVoL', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'eVoL', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'IraqiZorro', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'IraqiZorro', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'R3cKeD', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'R3cKeD', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Xelciar', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Xelciar', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'XenoTek', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'XenoTek', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Poli5208', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Poli5208', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'selenagomez', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'selenagomez', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Hide', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Hide', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'LostBoyToph', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'LostBoyToph', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => true, + ]); + + + + + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'WalDeMar', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'WalDeMar', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'red-ABTION', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'red-ABTION', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'PTLam', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'PTLam', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Melyssandre', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Melyssandre', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'radha', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'radha', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'AgOny', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'AgOny', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Loere', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Loere', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'romgemsword', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'romgemsword', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'HellsDevil', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'HellsDevil', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'TetnoJJ', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'TetnoJJ', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Palmatoro', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Palmatoro', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'nettettoilette', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'nettettoilette', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'kaerl', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'kaerl', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Mowglie', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Mowglie', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'L3oN', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'L3oN', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Tr1cKy', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Tr1cKy', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'justman00', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'justman00', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'SkorpiBro', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'SkorpiBro', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Emirking', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Emirking', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Asater', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Asater', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'GreatkhALI', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'GreatkhALI', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'D1ngo', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'D1ngo', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Reddix', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Reddix', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'WalDeMar', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'WalDeMar', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'KeanuNakoa', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'KeanuNakoa', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'DarkPotato', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'DarkPotato', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Hundor', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Hundor', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Tyruzz', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Tyruzz', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'KValafar', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'KValafar', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'jetpacks', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'jetpacks', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => true, + ]); + + + + + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ViViQIZ', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ViViQIZ', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ViViRoyal', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ViViRoyal', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'tatuki217', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'tatuki217', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'druid', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'druid', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'mukuEA', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'mukuEA', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'LyRiz', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'LyRiz', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Supercell7', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Supercell7', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ACElmPaLe', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ACElmPaLe', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ACET4SA', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ACET4SA', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ACEMojo', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ACEMojo', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'StriVE', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'StriVE', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'TenaciTy', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'TenaciTy', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'pQq', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'pQq', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => '-DaDa-', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => '-DaDa-', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Yup', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Yup', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ILoveYoungJoo', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ILoveYoungJoo', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'ZouBH', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'ZouBH', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'beyou115', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'beyou115', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'LeblaNc', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'LeblaNc', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'TrendyWorld', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'TrendyWorld', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'YakumoLRan', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'YakumoLRan', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'i4N', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'i4N', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'SpaceLok', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'SpaceLok', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'TinoChung', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'TinoChung', + 'vainglory_shard_id' => 'ea', + 'vainglory_is_pro' => true, + ]); + + + + + + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Truffless', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Truffless', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Chingy', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Chingy', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'HARKONS', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'HARKONS', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'AnimeSaveMe', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'AnimeSaveMe', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'HundJaegers', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'HundJaegers', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'officialhein', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'officialhein', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'iLoC', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'iLoC', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => '-Kalua-', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => '-Kalua-', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'IIBaby', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'IIBaby', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'langryyoudie', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'langryyoudie', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'k0sh', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'k0sh', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'RubberMonkey', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'RubberMonkey', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'INKED', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'INKED', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'deftQ', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'deftQ', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => '-spaghetti-', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => '-spaghetti-', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Quatervois', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Quatervois', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Bxrealis', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Bxrealis', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Cyduck', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Cyduck', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'DeityStarz', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'DeityStarz', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'VETRUV', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'VETRUV', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'VETRUV', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'VETRUV', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'METREOTIRE', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'METREOTIRE', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'WwkilozinwW', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'WwkilozinwW', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'laykieng', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'laykieng', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'DepressionN', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'DepressionN', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'RaCcooN', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'RaCcooN', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'RasenShuriKen', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'RasenShuriKen', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'uNi', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'uNi', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'QuiXotic', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'QuiXotic', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'PerfectBladeX', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'PerfectBladeX', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'SnkEA', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'SnkEA', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'shak2713', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'shak2713', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'UrameshiYusuke', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'UrameshiYusuke', + 'vainglory_shard_id' => 'sa', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Mirotic', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Mirotic', + 'vainglory_shard_id' => 'sa', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'FalconDorian', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'FalconDorian', + 'vainglory_shard_id' => 'sa', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'Mastreijo', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Mastreijo', + 'vainglory_shard_id' => 'sa', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'GwM', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'GwM', + 'vainglory_shard_id' => 'sa', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '', + 'name' => 'SrMusTer', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'SrMusTer', + 'vainglory_shard_id' => 'sa', + 'vainglory_is_pro' => true, + ]); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('gamer', function(Blueprint $table){ + $sql = 'delete from gamer where vainsocial_status = "pro"'; + DB::connection()->getPdo()->exec($sql); + }); + } +} diff --git a/migrations/2017_05_05_082610_Setup_VGIF_as_Gamers.php b/migrations/2017_05_05_082610_Setup_VGIF_as_Gamers.php new file mode 100644 index 0000000..b4e17bb --- /dev/null +++ b/migrations/2017_05_05_082610_Setup_VGIF_as_Gamers.php @@ -0,0 +1,61 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SetupVGIFAsGamers extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('gamer')->insert([ + 'player_api_id' => '2f77ee16-e6d1-11e5-af7f-06eb725f8a76', + 'name' => 'Kronos9231', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Kronos9231', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '89ec3b76-9f74-11e5-8510-0628b69bf6d1', + 'name' => 'Eshxx', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Eshxx', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => 'ed75203e-3e6e-11e5-9190-0628b69bf6d1', + 'name' => 'Prithvi', + 'vainsocial_status' => 'pro', + 'vainglory_ign' => 'Prithvi', + 'vainglory_shard_id' => 'sea', + 'vainglory_is_pro' => true, + ]); + + Schema::table('gamer', function(Blueprint $table){ + $sql = 'delete from gamer where name in ("4ever")'; + DB::connection()->getPdo()->exec($sql); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('gamer', function(Blueprint $table){ + $sql = 'delete from gamer where name in ("Prithvi", "Eshxx", "Kronos9231")'; + DB::connection()->getPdo()->exec($sql); + }); + } +} diff --git a/migrations/2017_05_05_151026_Setup_Tournament_For_Kamael.php b/migrations/2017_05_05_151026_Setup_Tournament_For_Kamael.php new file mode 100644 index 0000000..b78bff2 --- /dev/null +++ b/migrations/2017_05_05_151026_Setup_Tournament_For_Kamael.php @@ -0,0 +1,35 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SetupTournamentForKamael extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('tournament')->insert([ + 'name' => 'Kamael', + 'status' => 'planned', + 'type' => 'team', + 'start'=> Carbon::createFromDate(2017, 5, 6), + 'end'=> Carbon::createFromDate(2020, 5, 27), + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_05_15_093335_Add_DPS_Part_Stats.php b/migrations/2017_05_15_093335_Add_DPS_Part_Stats.php new file mode 100644 index 0000000..66f3a13 --- /dev/null +++ b/migrations/2017_05_15_093335_Add_DPS_Part_Stats.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddDPSPartStats extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_stats', function (Blueprint $table) { + $table->dropColumn('final'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant_stats', function (Blueprint $table) { + $table->boolean('final')->default(true); + }); + } +} diff --git a/migrations/2017_05_15_215449_AddLondonUnitedTournament.php b/migrations/2017_05_15_215449_AddLondonUnitedTournament.php new file mode 100644 index 0000000..46db134 --- /dev/null +++ b/migrations/2017_05_15_215449_AddLondonUnitedTournament.php @@ -0,0 +1,48 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddLondonUnitedTournament extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('tournament', function (Blueprint $table) { + $table->string('region')->nullable(); + }); + + DB::table('tournament')->insert([ + 'api_id' => 'evil-8-london-spring', + 'name' => 'London United', + 'status' => 'planned', + 'type' => 'team', + 'start'=> Carbon::createFromDate(2017, 5, 18, 0, 0 , 0), + 'end'=> Carbon::createFromDate(2020, 5, 23, 0, 0, 0), + 'region'=> 'tournament-eu', + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + DB::table('tournament') + ->where('name', '=', 'London United') + ->delete(); + + Schema::table('tournament', function (Blueprint $table) { + $table->dropColumn('region'); + }); + } +} diff --git a/migrations/2017_05_29_000000_AddGamerMay.php b/migrations/2017_05_29_000000_AddGamerMay.php new file mode 100644 index 0000000..44d0be7 --- /dev/null +++ b/migrations/2017_05_29_000000_AddGamerMay.php @@ -0,0 +1,99 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddGamerMay extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('gamer')->insert([ + 'player_api_id' => '6d635ffc-fa64-11e5-bbd9-068789513eb5', + 'name' => 'Ayshel', + 'vainsocial_status' => 'Supporter', + 'vainglory_ign' => 'Ayshel', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '627cf718-fa61-11e5-b541-06b48b82cd49', + 'name' => 'Garlock', + 'vainsocial_status' => 'Supporter', + 'vainglory_ign' => 'Garlock', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => 'daceee88-a8cb-11e6-9fc1-068789513eb5', + 'name' => 'Terapia', + 'vainsocial_status' => 'Contributor', + 'vainglory_ign' => 'Terapia', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '3651bcbe-b646-11e5-867a-06d90c28bf1a', + 'name' => 'EzeKiel', + 'vainsocial_status' => 'Contributor', + 'vainglory_ign' => 'EzeKiel', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => 'de0d05b6-e18b-11e4-b877-06d90c28bf1a', + 'name' => 'maegz', + 'vainsocial_status' => 'Partner, NACL', + 'vainglory_ign' => 'maegz', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '68939eae-6ed0-11e4-af50-062d0b175276', + 'name' => 'angelwolf', + 'vainsocial_status' => 'Partner, NACL', + 'vainglory_ign' => 'angelwolf', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '49f38bb2-3892-11e5-84b0-06eb725f8a76', + 'name' => 'Finch32', + 'vainsocial_status' => 'Partner, NACL', + 'vainglory_ign' => 'Finch32', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '34b21156-d482-11e5-bc88-06f4ee369f53', + 'name' => 'Shel', + 'vainsocial_status' => 'Partner, NACL', + 'vainglory_ign' => 'Shel', + 'vainglory_shard_id' => 'na', + 'vainglory_is_pro' => false, + ]); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_05_29_092039_SetupTrueSkillColumns.php b/migrations/2017_05_29_092039_SetupTrueSkillColumns.php new file mode 100644 index 0000000..d92864b --- /dev/null +++ b/migrations/2017_05_29_092039_SetupTrueSkillColumns.php @@ -0,0 +1,59 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SetupTrueSkillColumns extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant', function (Blueprint $table) { + $table->double('trueskill_mu')->nullable(); + $table->double('trueskill_sigma')->nullable(); + $table->double('trueskill_delta')->nullable(); + $table->double('nacl_score')->nullable(); + }); + + Schema::table('participant_stats', function (Blueprint $table) { + $table->double('nacl_score')->nullable(); + }); + + Schema::table('player', function (Blueprint $table) { + $table->double('trueskill_mu')->nullable(); + $table->double('trueskill_sigma')->nullable(); + }); + + Schema::table('match', function (Blueprint $table) { + $table->double('trueskill_quality')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant', function (Blueprint $table) { + $table->dropColumn('trueskill_mu'); + $table->dropColumn('trueskill_sigma'); + $table->dropColumn('trueskill_delta'); + }); + + Schema::table('player', function (Blueprint $table) { + $table->dropColumn('trueskill_mu'); + $table->dropColumn('trueskill_sigma'); + }); + + Schema::table('match', function (Blueprint $table) { + $table->dropColumn('trueskill_quality'); + }); + } +} diff --git a/migrations/2017_05_315_000053_create_participant_phases_table.php b/migrations/2017_05_315_000053_create_participant_phases_table.php new file mode 100644 index 0000000..c5e9cef --- /dev/null +++ b/migrations/2017_05_315_000053_create_participant_phases_table.php @@ -0,0 +1,105 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateParticipantPhasesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('participant_phases', function (Blueprint $table) { + $table->increments('id'); + $table->timestamps(); + $table->unsignedSmallInteger('start'); + $table->unsignedSmallInteger('end'); + + // foreign key: api id + $table->uuid('participant_api_id')->index(); + + // snapshot stats + $table->unsignedSmallInteger('kills')->nullable(); + $table->unsignedSmallInteger('deaths')->nullable(); + $table->unsignedSmallInteger('assists')->nullable(); + $table->unsignedMediumInteger('farm')->nullable(); + $table->unsignedSmallInteger('minion_kills')->nullable(); + $table->unsignedSmallInteger('jungle_kills')->nullable(); + $table->unsignedSmallInteger('non_jungle_minion_kills')->nullable(); + $table->unsignedSmallInteger('crystal_mine_captures')->nullable(); + $table->unsignedSmallInteger('gold_mine_captures')->nullable(); + $table->unsignedSmallInteger('kraken_captures')->nullable(); + $table->unsignedSmallInteger('turret_captures')->nullable(); + $table->unsignedMediumInteger('gold')->nullable(); + $table->double('dmg_true_hero')->nullable(); + $table->double('dmg_true_kraken')->nullable(); + $table->double('dmg_true_turret')->nullable(); + $table->double('dmg_true_vain_turret')->nullable(); + $table->double('dmg_true_others')->nullable(); + $table->double('dmg_dealt_hero')->nullable(); + $table->double('dmg_dealt_kraken')->nullable(); + $table->double('dmg_dealt_turret')->nullable(); + $table->double('dmg_dealt_vain_turret')->nullable(); + $table->double('dmg_dealt_others')->nullable(); + + $table->double('dmg_rcvd_dealt_hero')->nullable(); + $table->double('dmg_rcvd_true_hero')->nullable(); + $table->double('dmg_rcvd_dealt_others')->nullable(); + $table->double('dmg_rcvd_true_others')->nullable(); + + $table->unsignedTinyInteger('ability_a_level')->nullable(); + $table->unsignedTinyInteger('ability_b_level')->nullable(); + $table->unsignedTinyInteger('ability_c_level')->nullable(); + + $table->unsignedTinyInteger('hero_level')->nullable(); // only via Telemetry! + + // traits + $table->double('kda_ratio', 5, 5)->nullable(); + $table->double('kill_participation', 5, 5)->nullable(); + $table->double('cs_per_min', 7, 5)->nullable(); + $table->double('kills_per_min', 6, 5)->nullable(); + // scores - all int between 0 and 100 + // shared + $table->double('impact_score')->nullable(); + $table->double('objective_score')->nullable(); + $table->double('damage_cp_score')->nullable(); // c & j + $table->double('damage_wp_score')->nullable(); // c & j + $table->double('sustain_score')->nullable(); // j & cpt + // carry + $table->double('farm_lane_score')->nullable(); + $table->double('kill_score')->nullable(); + $table->double('objective_lane_score')->nullable(); + // jungler + $table->double('farm_jungle_score')->nullable(); + $table->double('peel_score')->nullable(); + $table->double('kill_assist_score')->nullable(); + $table->double('objective_jungle_score')->nullable(); // gold mine, sentry, Kraken + // captain + $table->double('vision_score')->nullable(); + $table->double('heal_score')->nullable(); + $table->double('assist_score')->nullable(); + $table->double('utility_score')->nullable(); + // meta + $table->double('synergy_score')->nullable(); + $table->double('build_score')->nullable(); + $table->double('offmeta_score')->nullable(); + + $table->unique(['participant_api_id', 'start', 'end']); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('participant_phases'); + } +} diff --git a/migrations/2017_05_31_000000_Add_Series_Patch_25.php b/migrations/2017_05_31_000000_Add_Series_Patch_25.php new file mode 100644 index 0000000..1a2abf8 --- /dev/null +++ b/migrations/2017_05_31_000000_Add_Series_Patch_25.php @@ -0,0 +1,50 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch25 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.4') + ->update([ + 'end' => Carbon::createFromDate(2017, 5, 31) + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.5', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 5, 31), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.5', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 5, 31), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_05_31_000001_Create_Tournament_Season_Table.php b/migrations/2017_05_31_000001_Create_Tournament_Season_Table.php new file mode 100644 index 0000000..1100ee4 --- /dev/null +++ b/migrations/2017_05_31_000001_Create_Tournament_Season_Table.php @@ -0,0 +1,37 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentSeasonTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('season', function (Blueprint $table) { + $table->increments('id'); + $table->string('api_id')->nullable(); // tournament ID - assuming we get it some day from API + $table->integer('league_id')->index(); // FK to Tournament table. + + $table->string('name'); + $table->timestampTz('start')->nullable(); + $table->timestampTz('end')->nullable(); + $table->enum('status', ['planned', 'pre-season', 'in-season', 'post-season']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('season'); + } +} diff --git a/migrations/2017_05_31_000002_Create_Tournament_Stage_Table.php b/migrations/2017_05_31_000002_Create_Tournament_Stage_Table.php new file mode 100644 index 0000000..b1ce7eb --- /dev/null +++ b/migrations/2017_05_31_000002_Create_Tournament_Stage_Table.php @@ -0,0 +1,40 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentStageTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('stage', function (Blueprint $table) { + $table->increments('id'); + $table->string('api_id')->nullable(); // tournament ID - assuming we get it some day from API + $table->integer('season_id')->index(); // FK to Tournament table. + + $table->string('name'); + $table->timestampTz('start')->nullable(); + $table->timestampTz('end')->nullable(); + + $table->enum('type', ['group', 'league', 'swiss', 'single_elimination', 'double_elimination', 'bracket']); + $table->enum('status', ['planned', 'active', 'finished']); + $table->enum('phase', ['pre-season','group','playoffs','finals']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('stage'); + } +} diff --git a/migrations/2017_05_31_000003_Create_Tournament_Division_Table.php b/migrations/2017_05_31_000003_Create_Tournament_Division_Table.php new file mode 100644 index 0000000..01d3bc7 --- /dev/null +++ b/migrations/2017_05_31_000003_Create_Tournament_Division_Table.php @@ -0,0 +1,35 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentDivisionTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('division', function (Blueprint $table) { + $table->increments('id'); + $table->string('api_id')->nullable(); // tournament ID - assuming we get it some day from API + $table->integer('stage_id')->index(); // FK to Tournament table. + + $table->string('name'); + $table->integer('rank')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('division'); + } +} diff --git a/migrations/2017_05_31_000004_Create_Tournament_Events_Table.php b/migrations/2017_05_31_000004_Create_Tournament_Events_Table.php new file mode 100644 index 0000000..da40928 --- /dev/null +++ b/migrations/2017_05_31_000004_Create_Tournament_Events_Table.php @@ -0,0 +1,41 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentEventsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('event', function (Blueprint $table) { + $table->increments('id'); + $table->string('api_id')->nullable(); // tournament ID - assuming we get it some day from API + $table->integer('division_id')->index(); + + $table->string('name'); + $table->integer('team_1_id')->index()->nullable(); // FK to Teams table - Team A + $table->integer('team_1_score')->nullable(); + $table->integer('team_2_id')->index()->nullable(); // FK to Teams table - Team B + $table->integer('team_2_score')->nullable(); + $table->timestamp('date')->nullable(); + $table->enum('bestOf', ['1', '3', '5', '7', '9'])->nullable(); + $table->integer('winner_id')->index()->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('event'); + } +} diff --git a/migrations/2017_05_31_000005_Create_Tournament_Event_Result_Table.php b/migrations/2017_05_31_000005_Create_Tournament_Event_Result_Table.php new file mode 100644 index 0000000..d3b739e --- /dev/null +++ b/migrations/2017_05_31_000005_Create_Tournament_Event_Result_Table.php @@ -0,0 +1,42 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentEventResultTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('result', function (Blueprint $table) { + $table->increments('id'); + $table->string('api_id')->nullable(); // tournament ID - assuming we get it some day from API + + $table->integer('event_id')->index(); + $table->uuid('match_api_id')->index(); + $table->uuid('shard_id')->index(); + + $table->unsignedTinyInteger('sequence')->nullable(); + $table->integer('winner_id')->index()->nullable(); + + $table->unique(['event_id', 'match_api_id', 'shard_id']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('result'); + } +} + + diff --git a/migrations/2017_05_31_000006_Create_Tournament_Team_Registration_Table.php b/migrations/2017_05_31_000006_Create_Tournament_Team_Registration_Table.php new file mode 100644 index 0000000..46f42f1 --- /dev/null +++ b/migrations/2017_05_31_000006_Create_Tournament_Team_Registration_Table.php @@ -0,0 +1,46 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTournamentTeamRegistrationTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('division_team', function (Blueprint $table) { + $table->increments('id'); + + $table->integer('team_id')->index(); + $table->integer('division_id')->index(); + + $table->integer('played'); + $table->integer('wins'); + $table->integer('games_played'); + $table->integer('games_won'); + $table->integer('seed'); + $table->double('points'); + $table->string('sub_division'); + + + $table->unique(['team_id', 'division_id']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('division_team'); + } +} + + diff --git a/migrations/2017_06_01_000000_AddELOToPlayer.php b/migrations/2017_06_01_000000_AddELOToPlayer.php new file mode 100644 index 0000000..ac95cbe --- /dev/null +++ b/migrations/2017_06_01_000000_AddELOToPlayer.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddELOToPlayer extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('player', function (Blueprint $table) { + $table->double('elo')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('player', function (Blueprint $table) { + $table->dropColumn('elo')->nullable(); + }); + } +} diff --git a/migrations/2017_06_01_000000_AddGamerJune1.php b/migrations/2017_06_01_000000_AddGamerJune1.php new file mode 100644 index 0000000..059ba21 --- /dev/null +++ b/migrations/2017_06_01_000000_AddGamerJune1.php @@ -0,0 +1,37 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddGamerJune1 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('gamer')->insert([ + 'player_api_id' => '2537169e-2619-11e5-91a4-06eb725f8a76', + 'name' => 'Shiqan', + 'vainsocial_status' => 'Developer', + 'vainglory_ign' => 'Shiqan', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => false, + ]); + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_06_08_000000_Several_Changes_In_June.php b/migrations/2017_06_08_000000_Several_Changes_In_June.php new file mode 100644 index 0000000..0fb6103 --- /dev/null +++ b/migrations/2017_06_08_000000_Several_Changes_In_June.php @@ -0,0 +1,171 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SeveralChangesInJune extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->string('items')->nullable(); + $table->string('item_grants')->nullable(); + $table->string('item_sells')->nullable(); + $table->string('ability_levels')->nullable(); + $table->string('ability_uses')->nullable(); + $table->string('ability_damage')->nullable(); + $table->string('item_uses')->nullable(); + $table->string('player_damage')->nullable(); + + $table->integer('draft_position')->nullable(); + $table->integer('ban')->nullable(); + $table->integer('pick')->nullable(); + }); + + + Schema::table('build', function (Blueprint $table) { + $table->string('dimension_on')->nullable(); + }); + + Schema::create('global_point_build', function (Blueprint $table) { + $table->increments('id'); + $table->dateTimeTz('updated_at'); + + // links - core dimensions + // meta + $table->bigInteger('series_id')->index(); // when + $table->bigInteger('filter_id')->index(); // custom + + // links - additional dimensions + // attributes + $table->bigInteger('hero_id')->index(); + $table->bigInteger('game_mode_id')->index(); + $table->bigInteger('skill_tier_id')->index(); + $table->bigInteger('build_id')->nullable()->index(); + $table->bigInteger('role_id')->nullable()->index(); + $table->bigInteger('region_id')->nullable()->index(); + + $table->unique(['series_id', 'filter_id', 'hero_id', 'game_mode_id', 'skill_tier_id', 'build_id', 'role_id', 'region_id'], 'global_point_build_in_space'); + + // same as player_point + // sums + $table->bigInteger('played')->nullable(); + $table->bigInteger('wins')->nullable(); + $table->bigInteger('time_spent')->nullable(); + + // stats: this is the same as participant_stats + // but sums (stats) and averages (traits) + $table->unsignedBigInteger('kills')->nullable(); + $table->unsignedBigInteger('deaths')->nullable(); + $table->unsignedBigInteger('assists')->nullable(); + $table->unsignedBigInteger('minion_kills')->nullable(); + $table->unsignedBigInteger('jungle_kills')->nullable(); + $table->unsignedBigInteger('non_jungle_minion_kills')->nullable(); + $table->unsignedBigInteger('crystal_mine_captures')->nullable(); + $table->unsignedBigInteger('gold_mine_captures')->nullable(); + $table->unsignedBigInteger('kraken_captures')->nullable(); + $table->unsignedBigInteger('turret_captures')->nullable(); + $table->unsignedBigInteger('gold')->nullable(); + + }); + + Schema::create('global_point_hero', function (Blueprint $table) { + $table->increments('id'); + $table->dateTimeTz('updated_at'); + + // links - core dimensions + // meta + $table->bigInteger('series_id')->index(); // when + $table->bigInteger('filter_id')->index(); // custom + + // links - additional dimensions + $table->bigInteger('hero_id')->index(); + $table->bigInteger('game_mode_id')->index(); + $table->bigInteger('skill_tier_id')->index(); + $table->bigInteger('build_id')->nullable()->index(); + $table->bigInteger('role_id')->nullable()->index(); + $table->bigInteger('region_id')->nullable()->index(); + + $table->bigInteger('enemy_hero_id')->index(); + + $table->unique(['series_id', 'filter_id', 'game_mode_id', 'skill_tier_id', 'build_id', 'role_id', 'region_id'], 'global_point_hero_in_space'); + + + // same as player_point + // sums + $table->bigInteger('played')->nullable(); + $table->bigInteger('wins')->nullable(); + $table->bigInteger('time_spent')->nullable(); + + // stats: this is the same as participant_stats + // but sums (stats) and averages (traits) + $table->unsignedBigInteger('kills')->nullable(); + $table->unsignedBigInteger('deaths')->nullable(); + $table->unsignedBigInteger('assists')->nullable(); + $table->unsignedBigInteger('minion_kills')->nullable(); + $table->unsignedBigInteger('jungle_kills')->nullable(); + $table->unsignedBigInteger('non_jungle_minion_kills')->nullable(); + $table->unsignedBigInteger('crystal_mine_captures')->nullable(); + $table->unsignedBigInteger('gold_mine_captures')->nullable(); + $table->unsignedBigInteger('kraken_captures')->nullable(); + $table->unsignedBigInteger('turret_captures')->nullable(); + $table->unsignedBigInteger('gold')->nullable(); + + }); + + + Schema::create('ability', function (Blueprint $table) { + $table->increments('id'); + $table->timestamps(); + + $table->string('api_id')->nullable(); + $table->string('hero_id')->nullable(); + $table->string("ability"); + + $table->string("name"); + $table->string("type"); + $table->string("active"); + $table->string("passive"); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->dropColumn('items'); + $table->dropColumn('item_grants'); + $table->dropColumn('item_sells'); + $table->dropColumn('ability_levels'); + $table->dropColumn('ability_uses'); + $table->dropColumn('ability_damage'); + $table->dropColumn('item_uses'); + $table->dropColumn('player_damage'); + + $table->dropColumn('draft_position')->nullable(); + $table->dropColumn('pick')->nullable(); + $table->dropColumn('ban'); + }); + + Schema::table('build', function (Blueprint $table) { + $table->dropColumn('dimension_on'); + }); + + + Schema::dropIfExists('global_point_build'); + + Schema::dropIfExists('global_point_hero'); + + Schema::dropIfExists('ability'); + } +} diff --git a/migrations/2017_06_21_000000_Add_Grace.php b/migrations/2017_06_21_000000_Add_Grace.php new file mode 100644 index 0000000..5b639eb --- /dev/null +++ b/migrations/2017_06_21_000000_Add_Grace.php @@ -0,0 +1,48 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddGrace extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Grace', + 'api_name' => '*Grace*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.6', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/migrations/2017_06_21_000000_Add_Series_Patch_26.php b/migrations/2017_06_21_000000_Add_Series_Patch_26.php new file mode 100644 index 0000000..37277dc --- /dev/null +++ b/migrations/2017_06_21_000000_Add_Series_Patch_26.php @@ -0,0 +1,49 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch26 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.5') + ->update([ + 'end' => Carbon::createFromDate(2017, 6, 21) + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.6', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 6, 21), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.6', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 6, 21), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_06_22_000000_Filters_For_Global_Point.php b/migrations/2017_06_22_000000_Filters_For_Global_Point.php new file mode 100644 index 0000000..6ef3d84 --- /dev/null +++ b/migrations/2017_06_22_000000_Filters_For_Global_Point.php @@ -0,0 +1,41 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class FiltersForGlobalPoint extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('global_point_filters', function (Blueprint $table) { + $table->increments('id'); + + $table->bigInteger('filter_id'); + $table->uuid('match_api_id'); + }); + + Schema::table('build', function (Blueprint $table) { + $table->string('database')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('global_point_filters'); + + Schema::table('build', function (Blueprint $table) { + $table->dropColumn('database'); + }); + } +} diff --git a/migrations/2017_06_22_000000_Merge_Into_GlobalPoint.php b/migrations/2017_06_22_000000_Merge_Into_GlobalPoint.php new file mode 100644 index 0000000..399c073 --- /dev/null +++ b/migrations/2017_06_22_000000_Merge_Into_GlobalPoint.php @@ -0,0 +1,90 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class MergeIntoGlobalPoint extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + // build table: item, number of items as int + Schema::table('build', function (Blueprint $table) { + $table->dropColumn('item_1'); + $table->dropColumn('item_2'); + $table->dropColumn('item_3'); + $table->dropColumn('item_4'); + $table->dropColumn('item_5'); + $table->dropColumn('item_6'); + }); + Schema::table('build', function (Blueprint $table) { + $table->bigInteger('item_1')->nullable(); + $table->bigInteger('item_2')->nullable(); + $table->bigInteger('item_3')->nullable(); + $table->bigInteger('item_4')->nullable(); + $table->bigInteger('item_5')->nullable(); + $table->bigInteger('item_6')->nullable(); + $table->integer('item_1_count')->nullable(); + $table->integer('item_2_count')->nullable(); + $table->integer('item_3_count')->nullable(); + $table->integer('item_4_count')->nullable(); + $table->integer('item_5_count')->nullable(); + $table->integer('item_6_count')->nullable(); + }); + + // add enemy, add to index, drop unused traits + Schema::table('global_point', function (Blueprint $table) { + $table->bigInteger('enemy_hero_id')->after('role_id'); + $table->bigInteger('enemy_role_id')->after('enemy_hero_id'); + + $table->dropUnique('global_point_in_space'); + $table->unique(['series_id', 'filter_id', 'hero_id', 'game_mode_id', 'skill_tier_id', 'build_id', 'role_id', 'enemy_hero_id', 'enemy_role_id', 'region_id'], 'global_point_in_space'); + + // add previously missing `farm` + $table->double('farm')->after('assists'); + + // were null, add as soon as built + $table->dropColumn('kda_ratio'); + $table->dropColumn('kill_participation'); + $table->dropColumn('cs_per_min'); + $table->dropColumn('kills_per_min'); + + $table->dropColumn('objective_score'); + $table->dropColumn('damage_cp_score'); + $table->dropColumn('damage_wp_score'); + $table->dropColumn('sustain_score'); + $table->dropColumn('farm_lane_score'); + $table->dropColumn('kill_score'); + $table->dropColumn('objective_lane_score'); + $table->dropColumn('farm_jungle_score'); + $table->dropColumn('peel_score'); + $table->dropColumn('kill_assist_score'); + $table->dropColumn('objective_jungle_score'); + $table->dropColumn('vision_score'); + $table->dropColumn('heal_score'); + $table->dropColumn('assist_score'); + $table->dropColumn('utility_score'); + $table->dropColumn('synergy_score'); + $table->dropColumn('build_score'); + $table->dropColumn('offmeta_score'); + }); + + Schema::drop('global_point_hero'); + Schema::drop('global_point_build'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // help? + } +} diff --git a/migrations/2017_06_22_000000_Seed_Builds.php b/migrations/2017_06_22_000000_Seed_Builds.php new file mode 100644 index 0000000..c014c42 --- /dev/null +++ b/migrations/2017_06_22_000000_Seed_Builds.php @@ -0,0 +1,372 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SeedBuilds extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('build')->insert([ + 'id' => 1, + 'name' => 'all', + 'dimension_on' => 'global' + ]); + + DB::table('build')->insert([ + 'id' => 2, + 'name' => 'BP TM TM', + 'dimension_on' => 'global', + 'item_1' => 9, + 'item_2' => 64, + 'item_1_count' => 1, + 'item_2_count' => 2, + ]); + + DB::table('build')->insert([ + 'id' => 3, + 'name' => 'TB BP TM', + 'dimension_on' => 'global', + 'item_1' => 61, + 'item_2' => 9, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 4, + 'name' => 'SB BP TT', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 9, + 'item_3' => 62, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 5, + 'name' => 'SM BP TM', + 'dimension_on' => 'global', + 'item_1' => 51, + 'item_2' => 9, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 6, + 'name' => 'SM BP SB', + 'dimension_on' => 'global', + 'item_1' => 51, + 'item_2' => 9, + 'item_3' => 56, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 7, + 'name' => 'SB BP TM', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 64, + 'item_3' => 9, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 8, + 'name' => 'SB TM TM', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 64, + 'item_1_count' => 1, + 'item_2_count' => 2, + ]); + + DB::table('build')->insert([ + 'id' => 9, + 'name' => 'BP SM PS', + 'dimension_on' => 'global', + 'item_1' => 9, + 'item_2' => 51, + 'item_3' => 47, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 10, + 'name' => 'TB SB TM', + 'dimension_on' => 'global', + 'item_1' => 61, + 'item_2' => 56, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 11, + 'name' => 'SB PS BP', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 47, + 'item_3' => 9, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 12, + 'name' => 'TB SB SB', + 'dimension_on' => 'global', + 'item_1' => 61, + 'item_2' => 56, + 'item_1_count' => 1, + 'item_2_count' => 2, + ]); + + DB::table('build')->insert([ + 'id' => 13, + 'name' => 'SB TT TM', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 62, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 14, + 'name' => 'SM TT SB', + 'dimension_on' => 'global', + 'item_1' => 51, + 'item_2' => 62, + 'item_3' => 56, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 15, + 'name' => 'AS BM AC', + 'dimension_on' => 'global', + 'item_1' => 2, + 'item_2' => 10, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 16, + 'name' => 'AS BM Eve', + 'dimension_on' => 'global', + 'item_1' => 2, + 'item_2' => 10, + 'item_3' => 23, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 17, + 'name' => 'Eve BM FB', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 27, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 18, + 'name' => 'SG BM Eve', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 52, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 19, + 'name' => 'SG CW BM', + 'dimension_on' => 'global', + 'item_1' => 52, + 'item_2' => 12, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 20, + 'name' => 'SC AS BM', + 'dimension_on' => 'global', + 'item_1' => 58, + 'item_2' => 2, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 21, + 'name' => 'AC FB BM', + 'dimension_on' => 'global', + 'item_1' => 3, + 'item_2' => 27, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + DB::table('build')->insert([ + 'id' => 22, + 'name' => 'AS SG BM', + 'dimension_on' => 'global', + 'item_1' => 2, + 'item_2' => 52, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 23, + 'name' => 'AC SG BM', + 'dimension_on' => 'global', + 'item_1' => 3, + 'item_2' => 52, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 24, + 'name' => 'Eve BM AC', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 25, + 'name' => 'PS TB BP', + 'dimension_on' => 'global', + 'item_1' => 47, + 'item_2' => 61, + 'item_3' => 9, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 26, + 'name' => 'BM AS Echo', + 'dimension_on' => 'global', + 'item_1' => 10, + 'item_2' => 2, + 'item_3' => 20, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 27, + 'name' => 'BM Eve Echo', + 'dimension_on' => 'global', + 'item_1' => 10, + 'item_2' => 23, + 'item_3' => 20, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 28, + 'name' => 'BM AC Echo', + 'dimension_on' => 'global', + 'item_1' => 10, + 'item_2' => 3, + 'item_3' => 20, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 29, + 'name' => 'BM SG Echo', + 'dimension_on' => 'global', + 'item_1' => 10, + 'item_2' => 52, + 'item_3' => 20, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 30, + 'name' => 'SB TB TT', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 61, + 'item_3' => 62, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_06_28_000000_League_Setups.php b/migrations/2017_06_28_000000_League_Setups.php new file mode 100644 index 0000000..5366239 --- /dev/null +++ b/migrations/2017_06_28_000000_League_Setups.php @@ -0,0 +1,40 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class LeagueSetups extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('team', function (Blueprint $table) { + // $table->dropColumn('tournament_id'); + }); + + Schema::table('stage', function (Blueprint $table) { + $table->integer('rank'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('team', function (Blueprint $table) { + // $table->integer('tournament_id'); + }); + + Schema::table('stage', function (Blueprint $table) { + $table->dropColumn('rank'); + }); + } +} diff --git a/migrations/2017_07_07_000000_Seed_Builds_02.php b/migrations/2017_07_07_000000_Seed_Builds_02.php new file mode 100644 index 0000000..710cd38 --- /dev/null +++ b/migrations/2017_07_07_000000_Seed_Builds_02.php @@ -0,0 +1,169 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SeedBuilds02 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('build')->insert([ + 'id' => 31, + 'name' => 'FoR CR Contrap', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 14, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 32, + 'name' => 'FoR CR AP', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 4, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 33, + 'name' => 'FoR CR SC', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 58, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 34, + 'name' => 'FoR CR WT', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 66, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 35, + 'name' => 'FoR CR Echo', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 20, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 36, + 'name' => 'FoR CR CW', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 12, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 37, + 'name' => 'FoR CR NW', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 43, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 38, + 'name' => 'FoR CR SS', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 53, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 39, + 'name' => 'FoR CR HC', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 28, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 40, + 'name' => 'FoR CR PS', + 'dimension_on' => 'global', + 'item_1' => 26, + 'item_2' => 15, + 'item_3' => 47, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 41, + 'name' => 'SM BP BS', + 'dimension_on' => 'global', + 'item_1' => 51, + 'item_2' => 9, + 'item_3' => 7, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 42, + 'name' => 'SB BP BS', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 9, + 'item_3' => 7, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_07_14_000000_Modify_Event_To_Support_Round.php b/migrations/2017_07_14_000000_Modify_Event_To_Support_Round.php new file mode 100644 index 0000000..ec43074 --- /dev/null +++ b/migrations/2017_07_14_000000_Modify_Event_To_Support_Round.php @@ -0,0 +1,34 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class ModifyEventToSupportRound extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('event', function (Blueprint $table) { + $table->integer('round')->nullable(); + $table->integer('position')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('event', function (Blueprint $table) { + $table->dropColumn('round'); + $table->dropColumn('position'); + }); + } +} diff --git a/migrations/2017_07_19_000000_User_Premium_Setup.php b/migrations/2017_07_19_000000_User_Premium_Setup.php new file mode 100644 index 0000000..9a7a8dc --- /dev/null +++ b/migrations/2017_07_19_000000_User_Premium_Setup.php @@ -0,0 +1,100 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class UserPremiumSetup extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('users', function (Blueprint $table) { + $table->enum('access_type', ['free', 'loyal', 'plus', 'premium']); + }); + + Schema::table('player_point', function (Blueprint $table) { + //will be moved to different positions + if (Schema::hasColumn('player_point', 'updated_at')) { + $table->dropColumn('updated_at'); + $table->dropColumn('time_spent'); + + // were null, add as soon as built + $table->dropColumn('kda_ratio'); + $table->dropColumn('kill_participation'); + $table->dropColumn('cs_per_min'); + $table->dropColumn('kills_per_min'); + + $table->dropColumn('objective_score'); + $table->dropColumn('damage_cp_score'); + $table->dropColumn('damage_wp_score'); + $table->dropColumn('sustain_score'); + $table->dropColumn('farm_lane_score'); + $table->dropColumn('kill_score'); + $table->dropColumn('objective_lane_score'); + $table->dropColumn('farm_jungle_score'); + $table->dropColumn('peel_score'); + $table->dropColumn('kill_assist_score'); + $table->dropColumn('objective_jungle_score'); + $table->dropColumn('vision_score'); + $table->dropColumn('heal_score'); + $table->dropColumn('assist_score'); + $table->dropColumn('utility_score'); + $table->dropColumn('synergy_score'); + $table->dropColumn('build_score'); + $table->dropColumn('offmeta_score'); + $table->dropColumn('hero_level'); + } + }); + + Schema::table('player_point', function (Blueprint $table) { + $table->double('trueskill_max')->after('wins')->nullable(); + $table->double('trueskill_delta')->after('trueskill_max')->nullable(); + $table->double('trueskill_mu')->after('trueskill_delta')->nullable(); + $table->double('trueskill_sigma')->after('trueskill_mu')->nullable(); + $table->double('elo')->after('trueskill_sigma')->nullable(); + + $table->dateTimeTz('updated_at')->after('id'); + $table->bigInteger('time_spent')->after('wins'); + $table->double('farm')->after('assists'); + }); + + Schema::table('global_point', function (Blueprint $table) { + $table->double('trueskill_delta')->after('wins')->nullable(); + $table->double('surrender')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('access_type'); + }); + + Schema::table('player_point', function (Blueprint $table) { + $table->dropColumn('trueskill_mu'); + $table->dropColumn('trueskill_sigma'); + $table->dropColumn('trueskill_max'); + $table->dropColumn('trueskill_delta'); + $table->dropColumn('elo'); + + $table->dropColumn('updated_at'); + $table->dropColumn('time_spent'); + $table->dropColumn('farm'); + }); + + Schema::table('global_point', function (Blueprint $table) { + $table->dropColumn('trueskill_delta')->after('wins')->nullable(); + $table->dropColumn('surrender')->nullable(); + }); + } +} diff --git a/migrations/2017_07_31_000000_create_global_point_phase_table.php b/migrations/2017_07_31_000000_create_global_point_phase_table.php new file mode 100644 index 0000000..00c06a9 --- /dev/null +++ b/migrations/2017_07_31_000000_create_global_point_phase_table.php @@ -0,0 +1,100 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateGlobalPointPhaseTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('global_point_phase', function (Blueprint $table) { + $table->increments('id'); + $table->dateTimeTz('updated_at'); + + // links - core dimensions + // meta + $table->bigInteger('series_id')->index(); // when + $table->bigInteger('filter_id')->index(); // custom + + // links - additional dimensions + // attributes + $table->bigInteger('hero_id')->index(); + $table->bigInteger('game_mode_id')->index(); + $table->bigInteger('skill_tier_id')->index(); + $table->bigInteger('build_id')->nullable()->index(); + $table->bigInteger('role_id')->nullable()->index(); + $table->bigInteger('region_id')->nullable()->index(); + + // phase dimensions + $table->bigInteger('phase_start')->nullable()->index(); + $table->bigInteger('phase_end')->nullable()->index(); + + $table->unique(['series_id', 'filter_id', 'hero_id', 'game_mode_id', 'skill_tier_id', 'build_id', 'role_id', 'region_id'], 'global_point_phase_in_space'); + + // same as player_point + // sums + $table->bigInteger('played')->nullable(); + $table->bigInteger('wins')->nullable(); + $table->bigInteger('time_spent')->nullable(); + + // stats: this is the same as participant_stats + // but sums (stats) and averages (traits) + $table->unsignedBigInteger('kills')->nullable(); + $table->unsignedBigInteger('deaths')->nullable(); + $table->unsignedBigInteger('assists')->nullable(); + $table->unsignedBigInteger('farm')->nullable(); + $table->unsignedBigInteger('minion_kills')->nullable(); + $table->unsignedBigInteger('jungle_kills')->nullable(); + $table->unsignedBigInteger('non_jungle_minion_kills')->nullable(); + $table->unsignedBigInteger('crystal_mine_captures')->nullable(); + $table->unsignedBigInteger('gold_mine_captures')->nullable(); + $table->unsignedBigInteger('kraken_captures')->nullable(); + $table->unsignedBigInteger('turret_captures')->nullable(); + $table->unsignedBigInteger('gold')->nullable(); + + $table->double('dmg_true_hero')->nullable(); + $table->double('dmg_true_kraken')->nullable(); + $table->double('dmg_true_turret')->nullable(); + $table->double('dmg_true_vain_turret')->nullable(); + $table->double('dmg_true_others')->nullable(); + $table->double('dmg_dealt_hero')->nullable(); + $table->double('dmg_dealt_kraken')->nullable(); + $table->double('dmg_dealt_turret')->nullable(); + $table->double('dmg_dealt_vain_turret')->nullable(); + $table->double('dmg_dealt_others')->nullable(); + + $table->double('dmg_rcvd_dealt_hero')->nullable(); + $table->double('dmg_rcvd_true_hero')->nullable(); + $table->double('dmg_rcvd_dealt_others')->nullable(); + $table->double('dmg_rcvd_true_others')->nullable(); + + $table->unsignedTinyInteger('ability_a_level')->nullable(); + $table->unsignedTinyInteger('ability_b_level')->nullable(); + $table->unsignedTinyInteger('ability_c_level')->nullable(); + + $table->unsignedTinyInteger('hero_level')->nullable(); // only via Telemetry! + + // traits + $table->double('kda_ratio', 5, 5)->nullable(); + $table->double('kill_participation', 5, 5)->nullable(); + $table->double('cs_per_min', 7, 5)->nullable(); + $table->double('kills_per_min', 6, 5)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('global_point_phase'); + } +} diff --git a/migrations/2017_07_31_000000_create_gp_bans_table.php b/migrations/2017_07_31_000000_create_gp_bans_table.php new file mode 100644 index 0000000..06f5d95 --- /dev/null +++ b/migrations/2017_07_31_000000_create_gp_bans_table.php @@ -0,0 +1,51 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateGpBansTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('global_point_bans', function (Blueprint $table) { + $table->increments('id'); + $table->dateTimeTz('updated_at'); + + // links - core dimensions + // meta + $table->bigInteger('series_id')->index(); // when + $table->bigInteger('filter_id')->index(); // custom + + // links - additional dimensions + // attributes + $table->bigInteger('hero_id')->index(); + $table->bigInteger('game_mode_id')->index(); + $table->bigInteger('skill_tier_id')->index(); + $table->bigInteger('region_id')->nullable()->index(); + + + $table->unique(['series_id', 'filter_id', 'hero_id', 'game_mode_id', 'skill_tier_id', 'region_id'], 'global_point_bans_in_space'); + + // same as player_point + // sums + $table->bigInteger('played')->nullable(); + $table->bigInteger('bans')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('global_point_bans'); + } +} diff --git a/migrations/2017_08_05_000000_Leaderboards.php b/migrations/2017_08_05_000000_Leaderboards.php new file mode 100644 index 0000000..57ee5f0 --- /dev/null +++ b/migrations/2017_08_05_000000_Leaderboards.php @@ -0,0 +1,40 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class Leaderboards extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + // needed to make LBs work in Leagues + // Schema::table('tournament_participants', function (Blueprint $table) { + // $table->unsignedBigInteger('season_id')->after('league_id')->nullable(); + // $table->enum('status', ['active', 'left', 'kicked', 'banned'])->nullable(); + + // $table->unique(['league_id', 'season_id', 'team_id', 'player_api_id'], 'player_team_league_membership_index'); + // }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('tournament_participants', function (Blueprint $table) { + $table->dropUnique('player_team_league_membership_index'); + + $table->dropColumn('season_id'); + $table->dropColumn('status'); + }); + } +} diff --git a/migrations/2017_08_08_000000_Add_Reza.php b/migrations/2017_08_08_000000_Add_Reza.php new file mode 100644 index 0000000..a8cda00 --- /dev/null +++ b/migrations/2017_08_08_000000_Add_Reza.php @@ -0,0 +1,47 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddReza extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Reza', + 'api_name' => '*Reza*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.7', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_08_08_000000_Add_Series_Patch_27.php b/migrations/2017_08_08_000000_Add_Series_Patch_27.php new file mode 100644 index 0000000..eeba07e --- /dev/null +++ b/migrations/2017_08_08_000000_Add_Series_Patch_27.php @@ -0,0 +1,49 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch27 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.6') + ->update([ + 'end' => Carbon::createFromDate(2017, 8, 8) + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.7', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 8, 8), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.7', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 8, 8), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_08_12_000000_update_index_on_global_point_phase_table.php b/migrations/2017_08_12_000000_update_index_on_global_point_phase_table.php new file mode 100644 index 0000000..e0e86c0 --- /dev/null +++ b/migrations/2017_08_12_000000_update_index_on_global_point_phase_table.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class UpdateIndexOnGlobalPointPhaseTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->dropIndex('global_point_phase_in_space'); + + $table->unique(['series_id', 'filter_id', 'hero_id', 'game_mode_id', 'skill_tier_id', 'build_id', 'role_id', 'region_id', 'phase_start', 'phase_end'], 'global_point_phase_in_space'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->dropIndex('global_point_phase_in_space'); + + $table->unique(['series_id', 'filter_id', 'hero_id', 'game_mode_id', 'skill_tier_id', 'build_id', 'role_id', 'region_id'], 'global_point_phase_in_space_index'); + }); + } +} diff --git a/migrations/2017_08_20_000000_User_SA_Setup.php b/migrations/2017_08_20_000000_User_SA_Setup.php new file mode 100644 index 0000000..0d21351 --- /dev/null +++ b/migrations/2017_08_20_000000_User_SA_Setup.php @@ -0,0 +1,50 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class UserSASetup extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('access_type'); + }); + + Schema::table('users', function (Blueprint $table) { + $table->enum('access_type', ['free', 'loyal', 'plus', 'premium', 'admin', 'super_admin']); + }); + + Schema::table('tournament', function (Blueprint $table) { + $table->string('owner', 191)->nullable(); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('access_type'); + }); + + Schema::table('users', function (Blueprint $table) { + $table->enum('access_type', ['free', 'loyal', 'plus', 'premium']); + }); + + Schema::table('tournament', function (Blueprint $table) { + $table->dropColumn('owner'); + }); + + } +} diff --git a/migrations/2017_08_21_000000_items_col_for_activables.php b/migrations/2017_08_21_000000_items_col_for_activables.php new file mode 100644 index 0000000..1e11c4b --- /dev/null +++ b/migrations/2017_08_21_000000_items_col_for_activables.php @@ -0,0 +1,183 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class ItemsColForActivables extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('item', function (Blueprint $table) { + $table->boolean("is_activable")->nullable(); + + $table->dropColumn("active"); + $table->dropColumn("passive"); + }); + + + DB::table('item') + ->where('name', 'Aegis') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Atlas Pauldron') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Contraption') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Crucible') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Dragonblood Contract') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Echo') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Flare') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Flare Gun') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Fountain of Renewal') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Halcyon Chargers') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Halcyon Potion') + ->update([ + 'is_activable' => true + ]); + + DB::table('item') + ->where('name', 'Journey Boots') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Minion Candy') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Nullwave Gauntlet') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Protector Contract') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Reflex Block') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Scout Trap') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Shiversteel') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Sprint Boots') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Travel Boots') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'War Treads') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Weapon Infusion') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Crystal Infusion') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Kissy') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Taunt') + ->update([ + 'is_activable' => true + ]); + DB::table('item') + ->where('name', 'Voice over Taunt') + ->update([ + 'is_activable' => true + ]); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('item', function (Blueprint $table) { + $table->dropColumn("is_activable"); + + $table->string('active', 191)->nullable(); + $table->string('passive', 191)->nullable(); + }); + + } +} diff --git a/migrations/2017_08_23_000000_update_leagues_support_regis.php b/migrations/2017_08_23_000000_update_leagues_support_regis.php new file mode 100644 index 0000000..11780f5 --- /dev/null +++ b/migrations/2017_08_23_000000_update_leagues_support_regis.php @@ -0,0 +1,51 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class UpdateLeaguesSupportRegis extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('tournament', function (Blueprint $table) { + $table->boolean("registrations_open")->nullable(); + $table->boolean("roster_locked")->nullable(); + }); + + Schema::table('event', function (Blueprint $table) { + $table->dropColumn("round"); + $table->dropColumn("position"); + + $table->integer("win_points")->nullable(); + $table->integer("bonus_points")->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('tournament', function (Blueprint $table) { + $table->dropColumn("registrations_open"); + $table->dropColumn("roster_locked"); + }); + + Schema::table('event', function (Blueprint $table) { + $table->integer("round")->nullable(); + $table->integer("position")->nullable(); + + $table->dropColumn("win_points"); + $table->dropColumn("bonus_points"); + }); + } +} diff --git a/migrations/2017_09_06_000000_Add_Series_Patch_28.php b/migrations/2017_09_06_000000_Add_Series_Patch_28.php new file mode 100644 index 0000000..c6b67d5 --- /dev/null +++ b/migrations/2017_09_06_000000_Add_Series_Patch_28.php @@ -0,0 +1,63 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch28 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.7') + ->update([ + 'end' => Carbon::createFromDate(2017, 9, 6) + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.8', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 9, 6), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.8', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 9, 6), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_HealingFlask*', + 'series' => ' ', + 'name' => 'Healing Flask', + 'is_activable' => '1' + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_Spellsword*', + 'series' => ' ', + 'name' => 'Spellsword', + 'is_activable' => '0' + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_09_09_000000_Seed_Spellsword_Builds.php b/migrations/2017_09_09_000000_Seed_Spellsword_Builds.php new file mode 100644 index 0000000..d067c57 --- /dev/null +++ b/migrations/2017_09_09_000000_Seed_Spellsword_Builds.php @@ -0,0 +1,109 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SeedSpellswordBuilds extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('build')->insert([ + 'id' => 43, + 'name' => 'SB SpS TM', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 73, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 44, + 'name' => 'SB SpS BP', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 73, + 'item_3' => 9, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 45, + 'name' => 'SB SpS PS', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 73, + 'item_3' => 47, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 46, + 'name' => 'SpS TB TT', + 'dimension_on' => 'global', + 'item_1' => 73, + 'item_2' => 61, + 'item_3' => 62, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 47, + 'name' => 'SpS TB TM', + 'dimension_on' => 'global', + 'item_1' => 73, + 'item_2' => 61, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 48, + 'name' => 'SpS TB BP', + 'dimension_on' => 'global', + 'item_1' => 73, + 'item_2' => 61, + 'item_3' => 9, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 49, + 'name' => 'SB PS TB', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 47, + 'item_3' => 61, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_09_30_110001_DynamicColumns_participant_items.php b/migrations/2017_09_30_110001_DynamicColumns_participant_items.php new file mode 100644 index 0000000..6b8651b --- /dev/null +++ b/migrations/2017_09_30_110001_DynamicColumns_participant_items.php @@ -0,0 +1,34 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DynamicColumnsParticipantItems extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('participant_items', function (Blueprint $table) { + $table->increments('id'); + + $table->string('shard_id'); + $table->uuid('participant_api_id')->unique(); + + $table->binary('items'); + $table->binary('item_grants'); + $table->binary('item_uses'); + $table->binary('item_sells'); + $table->boolean('surrender'); + }); + } + + public function down() + { + Schema::dropIfExists('participant_items'); + } +} diff --git a/migrations/2017_09_30_110002_DynamicColumnsParticipantPhases.php b/migrations/2017_09_30_110002_DynamicColumnsParticipantPhases.php new file mode 100644 index 0000000..7aeea07 --- /dev/null +++ b/migrations/2017_09_30_110002_DynamicColumnsParticipantPhases.php @@ -0,0 +1,41 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DynamicColumnsParticipantPhases extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->dropColumn('items'); + $table->dropColumn('item_grants'); + $table->dropColumn('item_sells'); + $table->dropColumn('ability_levels'); + $table->dropColumn('ability_uses'); + $table->dropColumn('ability_damage'); + $table->dropColumn('item_uses'); + $table->dropColumn('player_damage'); + }); + } + + public function down() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->string('items')->nullable(); + $table->string('item_grants')->nullable(); + $table->string('item_sells')->nullable(); + $table->string('ability_levels')->nullable(); + $table->string('ability_uses')->nullable(); + $table->string('ability_damage')->nullable(); + $table->string('item_uses')->nullable(); + $table->string('player_damage')->nullable(); + }); + } +} diff --git a/migrations/2017_09_30_110003_DynamicColumnsParticipantPhases2.php b/migrations/2017_09_30_110003_DynamicColumnsParticipantPhases2.php new file mode 100644 index 0000000..81e7b54 --- /dev/null +++ b/migrations/2017_09_30_110003_DynamicColumnsParticipantPhases2.php @@ -0,0 +1,65 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DynamicColumnsParticipantPhases2 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->binary('items'); + $table->binary('item_grants'); + $table->binary('item_sells'); + $table->unsignedSmallInteger('ability_a_use'); + $table->unsignedSmallInteger('ability_b_use'); + $table->unsignedSmallInteger('ability_c_use'); + $table->unsignedInteger('ability_a_damage_true'); + $table->unsignedInteger('ability_a_damage_dealt'); + $table->unsignedInteger('ability_b_damage_true'); + $table->unsignedInteger('ability_b_damage_dealt'); + $table->unsignedInteger('ability_c_damage_true'); + $table->unsignedInteger('ability_c_damage_dealt'); + $table->unsignedInteger('ability_perk_damage_true'); + $table->unsignedInteger('ability_perk_damage_dealt'); + $table->unsignedInteger('ability_aa_damage_true'); + $table->unsignedInteger('ability_aa_damage_dealt'); + $table->unsignedInteger('ability_aacrit_damage_true'); + $table->unsignedInteger('ability_aacrit_damage_dealt'); + $table->binary('item_uses'); + $table->binary('player_damage'); + }); + } + + public function down() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->dropColumn('items'); + $table->dropColumn('item_grants'); + $table->dropColumn('item_sells'); + $table->dropColumn('ability_a_use'); + $table->dropColumn('ability_b_use'); + $table->dropColumn('ability_c_use'); + $table->dropColumn('ability_a_damage_true'); + $table->dropColumn('ability_a_damage_dealt'); + $table->dropColumn('ability_b_damage_true'); + $table->dropColumn('ability_b_damage_dealt'); + $table->dropColumn('ability_c_damage_true'); + $table->dropColumn('ability_c_damage_dealt'); + $table->dropColumn('ability_perk_damage_true'); + $table->dropColumn('ability_perk_damage_dealt'); + $table->dropColumn('ability_aa_damage_true'); + $table->dropColumn('ability_aa_damage_dealt'); + $table->dropColumn('ability_aacrit_damage_true'); + $table->dropColumn('ability_aacrit_damage_dealt'); + $table->dropColumn('item_uses'); + $table->dropColumn('player_damage'); + }); + } +} diff --git a/migrations/2017_09_30_110005_DynamicColumnsGlobalPoint.php b/migrations/2017_09_30_110005_DynamicColumnsGlobalPoint.php new file mode 100644 index 0000000..a77eaec --- /dev/null +++ b/migrations/2017_09_30_110005_DynamicColumnsGlobalPoint.php @@ -0,0 +1,80 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DynamicColumnsGlobalPoint extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('global_point', function (Blueprint $table) { + $table->unsignedBigInteger('item_001_use'); // Aegis + $table->unsignedBigInteger('item_004_use'); // Atlas + $table->unsignedBigInteger('item_014_use'); // Contraption + $table->unsignedBigInteger('item_015_use'); // Crucible + $table->unsignedBigInteger('item_017_use'); // Crystal Infusion + $table->unsignedBigInteger('item_018_use'); // Dragonblood Contract + $table->unsignedBigInteger('item_020_use'); // Echo + $table->unsignedBigInteger('item_024_use'); // Flare + $table->unsignedBigInteger('item_025_use'); // Flare Gun + $table->unsignedBigInteger('item_026_use'); // Fountain + $table->unsignedBigInteger('item_028_use'); // Halcyon Chargers + $table->unsignedBigInteger('item_029_use'); // Halcyon Potion + $table->unsignedBigInteger('item_034_use'); // Journey Boots + $table->unsignedBigInteger('item_041_use'); // Minion Candy + $table->unsignedBigInteger('item_043_use'); // Nullwave Gauntlet + $table->unsignedBigInteger('item_048_use'); // Protector Contract + $table->unsignedBigInteger('item_049_use'); // Reflex Block + $table->unsignedBigInteger('item_050_use'); // Scout Trap + $table->unsignedBigInteger('item_053_use'); // Shiversteel + $table->unsignedBigInteger('item_057_use'); // Sprint Boots + $table->unsignedBigInteger('item_063_use'); // Travel Boots + $table->unsignedBigInteger('item_066_use'); // War Treads + $table->unsignedBigInteger('item_068_use'); // Weapon Infusion + $table->unsignedBigInteger('item_069_use'); // Taunt Kissy + $table->unsignedBigInteger('item_070_use'); // Taunt + $table->unsignedBigInteger('item_071_use'); // Voice over Taunt + $table->unsignedBigInteger('item_072_use'); // healing flask + }); + } + + public function down() + { + Schema::table('global_point', function (Blueprint $table) { + $table->dropColumn('item_001_use'); // Aegis + $table->dropColumn('item_004_use'); // Atlas + $table->dropColumn('item_014_use'); // Contraption + $table->dropColumn('item_015_use'); // Crucible + $table->dropColumn('item_017_use'); // Crystal Infusion + $table->dropColumn('item_018_use'); // Dragonblood Contract + $table->dropColumn('item_020_use'); // Echo + $table->dropColumn('item_024_use'); // Flare + $table->dropColumn('item_025_use'); // Flare Gun + $table->dropColumn('item_026_use'); // Fountain + $table->dropColumn('item_028_use'); // Halcyon Chargers + $table->dropColumn('item_029_use'); // Halcyon Potion + $table->dropColumn('item_034_use'); // Journey Boots + $table->dropColumn('item_041_use'); // Minion Candy + $table->dropColumn('item_043_use'); // Nullwave Gauntlet + $table->dropColumn('item_048_use'); // Protector Contract + $table->dropColumn('item_049_use'); // Reflex Block + $table->dropColumn('item_050_use'); // Scout Trap + $table->dropColumn('item_053_use'); // Shiversteel + $table->dropColumn('item_057_use'); // Sprint Boots + $table->dropColumn('item_063_use'); // Travel Boots + $table->dropColumn('item_066_use'); // War Treads + $table->dropColumn('item_068_use'); // Weapon Infusion + $table->dropColumn('item_069_use'); // Taunt Kissy + $table->dropColumn('item_070_use'); // Taunt + $table->dropColumn('item_071_use'); // Voice over Taunt + $table->dropColumn('item_072_use'); // Healing Flask + }); + + } +} diff --git a/migrations/2017_09_30_110006_DynamicColumnsGlobalPointPhase.php b/migrations/2017_09_30_110006_DynamicColumnsGlobalPointPhase.php new file mode 100644 index 0000000..699fc22 --- /dev/null +++ b/migrations/2017_09_30_110006_DynamicColumnsGlobalPointPhase.php @@ -0,0 +1,39 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DynamicColumnsGlobalPointPhase extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->dropColumn('ability_a_level'); + $table->dropColumn('ability_b_level'); + $table->dropColumn('ability_c_level'); + $table->dropColumn('hero_level'); + $table->dropColumn('kda_ratio'); + $table->dropColumn('kill_participation'); + $table->dropColumn('cs_per_min'); + $table->dropColumn('kills_per_min'); + }); + } + + + public function down() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->unsignedBigInteger('kda_ratio'); + $table->unsignedBigInteger('kill_participation'); + $table->unsignedBigInteger('cs_per_min'); + $table->unsignedBigInteger('kills_per_min'); + }); + + } +} diff --git a/migrations/2017_09_30_110007_DynamicColumnsGlobalPointPhase2.php b/migrations/2017_09_30_110007_DynamicColumnsGlobalPointPhase2.php new file mode 100644 index 0000000..afbec01 --- /dev/null +++ b/migrations/2017_09_30_110007_DynamicColumnsGlobalPointPhase2.php @@ -0,0 +1,113 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DynamicColumnsGlobalPointPhase2 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->unsignedBigInteger('ability_a_level'); + $table->unsignedBigInteger('ability_b_level'); + $table->unsignedBigInteger('ability_c_level'); + $table->unsignedBigInteger('hero_level'); + $table->unsignedBigInteger('ability_a_use'); + $table->unsignedBigInteger('ability_b_use'); + $table->unsignedBigInteger('ability_c_use'); + $table->unsignedBigInteger('ability_a_damage_true'); + $table->unsignedBigInteger('ability_a_damage_dealt'); + $table->unsignedBigInteger('ability_b_damage_true'); + $table->unsignedBigInteger('ability_b_damage_dealt'); + $table->unsignedBigInteger('ability_c_damage_true'); + $table->unsignedBigInteger('ability_c_damage_dealt'); + $table->unsignedBigInteger('ability_perk_damage_true'); + $table->unsignedBigInteger('ability_perk_damage_dealt'); + $table->unsignedBigInteger('ability_aa_damage_true'); + $table->unsignedBigInteger('ability_aa_damage_dealt'); + $table->unsignedBigInteger('ability_aacrit_damage_true'); + $table->unsignedBigInteger('ability_aacrit_damage_dealt'); + $table->unsignedBigInteger('item_001_use'); // Aegis + $table->unsignedBigInteger('item_004_use'); // Atlas + $table->unsignedBigInteger('item_014_use'); // Contraption + $table->unsignedBigInteger('item_015_use'); // Crucible + $table->unsignedBigInteger('item_017_use'); // Crystal Infusion + $table->unsignedBigInteger('item_018_use'); // Dragonblood Contract + $table->unsignedBigInteger('item_020_use'); // Echo + $table->unsignedBigInteger('item_024_use'); // Flare + $table->unsignedBigInteger('item_025_use'); // Flare Gun + $table->unsignedBigInteger('item_026_use'); // Fountain + $table->unsignedBigInteger('item_028_use'); // Halcyon Chargers + $table->unsignedBigInteger('item_029_use'); // Halcyon Potion + $table->unsignedBigInteger('item_034_use'); // Journey Boots + $table->unsignedBigInteger('item_041_use'); // Minion Candy + $table->unsignedBigInteger('item_043_use'); // Nullwave Gauntlet + $table->unsignedBigInteger('item_048_use'); // Protector Contract + $table->unsignedBigInteger('item_049_use'); // Reflex Block + $table->unsignedBigInteger('item_050_use'); // Scout Trap + $table->unsignedBigInteger('item_053_use'); // Shiversteel + $table->unsignedBigInteger('item_057_use'); // Sprint Boots + $table->unsignedBigInteger('item_063_use'); // Travel Boots + $table->unsignedBigInteger('item_066_use'); // War Treads + $table->unsignedBigInteger('item_068_use'); // Weapon Infusion + $table->unsignedBigInteger('item_069_use'); // Taunt Kissy + $table->unsignedBigInteger('item_070_use'); // Taunt + $table->unsignedBigInteger('item_071_use'); // Voice over Taunt + }); + } + + + public function down() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->dropColumn('ability_a_use'); + $table->dropColumn('ability_b_use'); + $table->dropColumn('ability_c_use'); + $table->dropColumn('ability_a_damage_true'); + $table->dropColumn('ability_a_damage_dealt'); + $table->dropColumn('ability_b_damage_true'); + $table->dropColumn('ability_b_damage_dealt'); + $table->dropColumn('ability_c_damage_true'); + $table->dropColumn('ability_c_damage_dealt'); + $table->dropColumn('ability_perk_damage_true'); + $table->dropColumn('ability_perk_damage_dealt'); + $table->dropColumn('ability_aa_damage_true'); + $table->dropColumn('ability_aa_damage_dealt'); + $table->dropColumn('ability_aacrit_damage_true'); + $table->dropColumn('ability_aacrit_damage_dealt'); + $table->dropColumn('item_001_use'); // Aegis + $table->dropColumn('item_004_use'); // Atlas + $table->dropColumn('item_014_use'); // Contraption + $table->dropColumn('item_015_use'); // Crucible + $table->dropColumn('item_017_use'); // Crystal Infusion + $table->dropColumn('item_018_use'); // Dragonblood Contract + $table->dropColumn('item_020_use'); // Echo + $table->dropColumn('item_024_use'); // Flare + $table->dropColumn('item_025_use'); // Flare Gun + $table->dropColumn('item_026_use'); // Fountain + $table->dropColumn('item_028_use'); // Halcyon Chargers + $table->dropColumn('item_029_use'); // Halcyon Potion + $table->dropColumn('item_034_use'); // Journey Boots + $table->dropColumn('item_041_use'); // Minion Candy + $table->dropColumn('item_043_use'); // Nullwave Gauntlet + $table->dropColumn('item_048_use'); // Protector Contract + $table->dropColumn('item_049_use'); // Reflex Block + $table->dropColumn('item_050_use'); // Scout Trap + $table->dropColumn('item_053_use'); // Shiversteel + $table->dropColumn('item_057_use'); // Sprint Boots + $table->dropColumn('item_063_use'); // Travel Boots + $table->dropColumn('item_066_use'); // War Treads + $table->dropColumn('item_068_use'); // Weapon Infusion + $table->dropColumn('item_069_use'); // Taunt Kissy + $table->dropColumn('item_070_use'); // Taunt + $table->dropColumn('item_071_use'); // Voice over Taunt + $table->dropColumn('item_072_use'); // Healing Flask + }); + } +} diff --git a/migrations/2017_10_01_000000_create_global_point_hero_vs_hero_table.php b/migrations/2017_10_01_000000_create_global_point_hero_vs_hero_table.php new file mode 100644 index 0000000..ef5215a --- /dev/null +++ b/migrations/2017_10_01_000000_create_global_point_hero_vs_hero_table.php @@ -0,0 +1,100 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateGlobalPointHeroVsHeroTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('global_point_hero_vs_hero', function (Blueprint $table) { + $table->increments('id'); + $table->dateTimeTz('updated_at'); + + // links - core dimensions + // meta + $table->bigInteger('series_id')->index(); // when + $table->bigInteger('filter_id')->index(); // custom + + // links - additional dimensions + // attributes + $table->bigInteger('hero_id')->index(); + $table->bigInteger('role_id')->index(); + $table->bigInteger('hero2_id')->index(); + $table->bigInteger('role2_id')->index(); + $table->boolean('played_with')->index(); + + $table->bigInteger('game_mode_id')->index(); + $table->bigInteger('skill_tier_id')->index(); + $table->bigInteger('region_id')->index(); + + + $table->unique(['series_id', 'filter_id', 'hero_id', 'role_id', 'hero2_id', 'role2_id', 'played_with', 'game_mode_id', 'skill_tier_id', 'region_id'], 'global_point_hero_vs_hero_in_space'); + + // same as global_point + // sums + $table->bigInteger('played'); + $table->bigInteger('wins'); + $table->double('trueskill_delta'); + $table->bigInteger('duration'); + $table->bigInteger('kills'); + $table->bigInteger('deaths'); + $table->bigInteger('assists'); + $table->bigInteger('farm'); + $table->bigInteger('minion_kills'); + $table->bigInteger('jungle_kills'); + $table->bigInteger('non_jungle_minion_kills'); + $table->bigInteger('crystal_mine_captures'); + $table->bigInteger('gold_mine_captures'); + $table->bigInteger('kraken_captures'); + $table->bigInteger('turret_captures'); + $table->bigInteger('gold'); + $table->bigInteger('impact_score'); + $table->bigInteger('surrender'); + + $table->unsignedBigInteger('item_001_use'); // Aegis + $table->unsignedBigInteger('item_004_use'); // Atlas + $table->unsignedBigInteger('item_014_use'); // Contraption + $table->unsignedBigInteger('item_015_use'); // Crucible + $table->unsignedBigInteger('item_017_use'); // Crystal Infusion + $table->unsignedBigInteger('item_018_use'); // Dragonblood Contract + $table->unsignedBigInteger('item_020_use'); // Echo + $table->unsignedBigInteger('item_024_use'); // Flare + $table->unsignedBigInteger('item_025_use'); // Flare Gun + $table->unsignedBigInteger('item_026_use'); // Fountain + $table->unsignedBigInteger('item_028_use'); // Halcyon Chargers + $table->unsignedBigInteger('item_029_use'); // Halcyon Potion + $table->unsignedBigInteger('item_034_use'); // Journey Boots + $table->unsignedBigInteger('item_041_use'); // Minion Candy + $table->unsignedBigInteger('item_043_use'); // Nullwave Gauntlet + $table->unsignedBigInteger('item_048_use'); // Protector Contract + $table->unsignedBigInteger('item_049_use'); // Reflex Block + $table->unsignedBigInteger('item_050_use'); // Scout Trap + $table->unsignedBigInteger('item_053_use'); // Shiversteel + $table->unsignedBigInteger('item_057_use'); // Sprint Boots + $table->unsignedBigInteger('item_063_use'); // Travel Boots + $table->unsignedBigInteger('item_066_use'); // War Treads + $table->unsignedBigInteger('item_068_use'); // Weapon Infusion + $table->unsignedBigInteger('item_069_use'); // Taunt Kissy + $table->unsignedBigInteger('item_070_use'); // Taunt + $table->unsignedBigInteger('item_071_use'); // Voice over Taunt + $table->unsignedBigInteger('item_072_use'); // Healing Flask + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('global_point_hero_vs_hero'); + } +} diff --git a/migrations/2017_10_07_000000_add_gp_heals.php b/migrations/2017_10_07_000000_add_gp_heals.php new file mode 100644 index 0000000..a713a4c --- /dev/null +++ b/migrations/2017_10_07_000000_add_gp_heals.php @@ -0,0 +1,48 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddGpHeals extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->double("heal_heal_hero")->after("ability_aacrit_damage_dealt")->nullable(); + $table->double("heal_healed_hero")->after("heal_heal_hero")->nullable(); + $table->double("heal_heal_other")->after("heal_healed_hero")->nullable(); + $table->double("heal_healed_other")->after("heal_heal_other")->nullable(); + $table->double("heal_rcvd_heal_hero")->after("heal_healed_other")->nullable(); + $table->double("heal_rcvd_healed_hero")->after("heal_rcvd_heal_hero")->nullable(); + $table->double("heal_rcvd_heal_other")->after("heal_rcvd_healed_hero")->nullable(); + $table->double("heal_rcvd_healed_other")->after("heal_rcvd_heal_other")->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->dropColumn("heal_heal_hero"); + $table->dropColumn("heal_healed_hero"); + $table->dropColumn("heal_heal_other"); + $table->dropColumn("heal_healed_other"); + $table->dropColumn("heal_rcvd_heal_hero"); + $table->dropColumn("heal_rcvd_healed_hero"); + $table->dropColumn("heal_rcvd_heal_other"); + $table->dropColumn("heal_rcvd_healed_other"); + }); + + } +} diff --git a/migrations/2017_10_07_000000_add_heals.php b/migrations/2017_10_07_000000_add_heals.php new file mode 100644 index 0000000..c657878 --- /dev/null +++ b/migrations/2017_10_07_000000_add_heals.php @@ -0,0 +1,48 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddHeals extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->double("heal_heal_hero")->nullable(); + $table->double("heal_healed_hero")->nullable(); + $table->double("heal_heal_other")->nullable(); + $table->double("heal_healed_other")->nullable(); + $table->double("heal_rcvd_heal_hero")->nullable(); + $table->double("heal_rcvd_healed_hero")->nullable(); + $table->double("heal_rcvd_heal_other")->nullable(); + $table->double("heal_rcvd_healed_other")->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->dropColumn("heal_heal_hero"); + $table->dropColumn("heal_healed_hero"); + $table->dropColumn("heal_heal_other"); + $table->dropColumn("heal_healed_other"); + $table->dropColumn("heal_rcvd_heal_hero"); + $table->dropColumn("heal_rcvd_healed_hero"); + $table->dropColumn("heal_rcvd_heal_other"); + $table->dropColumn("heal_rcvd_healed_other"); + }); + + } +} diff --git a/migrations/2017_10_07_000000_add_ranked_trueskill.php b/migrations/2017_10_07_000000_add_ranked_trueskill.php new file mode 100644 index 0000000..3c60d05 --- /dev/null +++ b/migrations/2017_10_07_000000_add_ranked_trueskill.php @@ -0,0 +1,51 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddRankedTrueskill extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_items', function (Blueprint $table) { + $table->double("trueskill_ranked_mu")->nullable(); + $table->double("trueskill_ranked_sigma")->nullable(); + $table->unsignedTinyInteger("any_afk")->nullable(); + }); + Schema::table('player', function (Blueprint $table) { + $table->double("trueskill_ranked_mu")->nullable(); + $table->double("trueskill_ranked_sigma")->nullable(); + }); + Schema::table('player_point', function (Blueprint $table) { + $table->double('trueskill_ranked_max')->after('trueskill_max')->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant_items', function (Blueprint $table) { + $table->dropColumn("trueskill_ranked_mu"); + $table->dropColumn("trueskill_ranked_sigma"); + $table->dropColumn("any_afk"); + }); + Schema::table('player', function (Blueprint $table) { + $table->dropColumn("trueskill_ranked_mu"); + $table->dropColumn("trueskill_ranked_sigma"); + }); + Schema::table('player_point', function (Blueprint $table) { + $table->dropColumn("trueskill_ranked_max"); + }); + } +} diff --git a/migrations/2017_10_11_000000_Add_Churnwalker.php b/migrations/2017_10_11_000000_Add_Churnwalker.php new file mode 100644 index 0000000..2c6426c --- /dev/null +++ b/migrations/2017_10_11_000000_Add_Churnwalker.php @@ -0,0 +1,47 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddChurnwalker extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Churnwalker', + 'api_name' => '*Churnwalker*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.9', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_10_11_000000_Add_Series_Patch_29.php b/migrations/2017_10_11_000000_Add_Series_Patch_29.php new file mode 100644 index 0000000..8ebd09b --- /dev/null +++ b/migrations/2017_10_11_000000_Add_Series_Patch_29.php @@ -0,0 +1,70 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch29 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.8') + ->update([ + 'end' => Carbon::createFromDate(2017, 10, 11) + ]); + + DB::table('series') + ->update([ + 'currentPatch' => 0 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.9', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 10, 11), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.9', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 10, 11), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_DragonsEye*', + 'series' => '0', + 'name' => 'Dragon\'s Eye', + 'is_activable' => '0' + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_Spellfire*', + 'series' => '0', + 'name' => 'Spellfire', + 'is_activable' => '0' + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_10_15_000000_Seed_Spellfire_Builds.php b/migrations/2017_10_15_000000_Seed_Spellfire_Builds.php new file mode 100644 index 0000000..449e592 --- /dev/null +++ b/migrations/2017_10_15_000000_Seed_Spellfire_Builds.php @@ -0,0 +1,241 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SeedSpellfireBuilds extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('build')->insert([ + 'id' => 50, + 'name' => 'CW BM DE', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 10, + 'item_3' => 74, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 51, + 'name' => 'CW BM SF', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 10, + 'item_3' => 75, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 52, + 'name' => 'CW BM FB', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 10, + 'item_3' => 27, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 53, + 'name' => 'CW BM AS', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 10, + 'item_3' => 2, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 54, + 'name' => 'CW BM AC', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 10, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 55, + 'name' => 'CW SF SG', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 75, + 'item_3' => 52, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 56, + 'name' => 'CW FB SF', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 27, + 'item_3' => 75, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 57, + 'name' => 'CW FB AC', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 27, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 58, + 'name' => 'CW AS AC', + 'dimension_on' => 'global', + 'item_1' => 12, + 'item_2' => 2, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 59, + 'name' => 'Eve BM DE', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 74, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 60, + 'name' => 'Eve BM SF', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 75, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 61, + 'name' => 'DE FB AC', + 'dimension_on' => 'global', + 'item_1' => 74, + 'item_2' => 27, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 62, + 'name' => 'DE AS BM', + 'dimension_on' => 'global', + 'item_1' => 74, + 'item_2' => 2, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 63, + 'name' => 'DE AS CW', + 'dimension_on' => 'global', + 'item_1' => 74, + 'item_2' => 2, + 'item_3' => 12, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 64, + 'name' => 'DE AS FB', + 'dimension_on' => 'global', + 'item_1' => 74, + 'item_2' => 2, + 'item_3' => 27, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 65, + 'name' => 'DE AS Eve', + 'dimension_on' => 'global', + 'item_1' => 74, + 'item_2' => 2, + 'item_3' => 23, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 66, + 'name' => 'DE SG AS', + 'dimension_on' => 'global', + 'item_1' => 74, + 'item_2' => 52, + 'item_3' => 2, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 67, + 'name' => 'DE SG Eve', + 'dimension_on' => 'global', + 'item_1' => 74, + 'item_2' => 52, + 'item_3' => 23, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_10_22_000000_DynamicColumnsPlayerPoint.php b/migrations/2017_10_22_000000_DynamicColumnsPlayerPoint.php new file mode 100644 index 0000000..14e15c3 --- /dev/null +++ b/migrations/2017_10_22_000000_DynamicColumnsPlayerPoint.php @@ -0,0 +1,84 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DynamicColumnsPlayerPoint extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('player_point', function (Blueprint $table) { + $table->unsignedBigInteger('surrender'); + + $table->unsignedBigInteger('item_001_use'); // Aegis + $table->unsignedBigInteger('item_004_use'); // Atlas + $table->unsignedBigInteger('item_014_use'); // Contraption + $table->unsignedBigInteger('item_015_use'); // Crucible + $table->unsignedBigInteger('item_017_use'); // Crystal Infusion + $table->unsignedBigInteger('item_018_use'); // Dragonblood Contract + $table->unsignedBigInteger('item_020_use'); // Echo + $table->unsignedBigInteger('item_024_use'); // Flare + $table->unsignedBigInteger('item_025_use'); // Flare Gun + $table->unsignedBigInteger('item_026_use'); // Fountain + $table->unsignedBigInteger('item_028_use'); // Halcyon Chargers + $table->unsignedBigInteger('item_029_use'); // Halcyon Potion + $table->unsignedBigInteger('item_034_use'); // Journey Boots + $table->unsignedBigInteger('item_041_use'); // Minion Candy + $table->unsignedBigInteger('item_043_use'); // Nullwave Gauntlet + $table->unsignedBigInteger('item_048_use'); // Protector Contract + $table->unsignedBigInteger('item_049_use'); // Reflex Block + $table->unsignedBigInteger('item_050_use'); // Scout Trap + $table->unsignedBigInteger('item_053_use'); // Shiversteel + $table->unsignedBigInteger('item_057_use'); // Sprint Boots + $table->unsignedBigInteger('item_063_use'); // Travel Boots + $table->unsignedBigInteger('item_066_use'); // War Treads + $table->unsignedBigInteger('item_068_use'); // Weapon Infusion + $table->unsignedBigInteger('item_069_use'); // Taunt Kissy + $table->unsignedBigInteger('item_070_use'); // Taunt + $table->unsignedBigInteger('item_071_use'); // Voice over Taunt + $table->unsignedBigInteger('item_072_use'); // healing flask + }); + } + + public function down() + { + Schema::table('player_point', function (Blueprint $table) { + $table->dropColumn('surrender'); + + $table->dropColumn('item_001_use'); // Aegis + $table->dropColumn('item_004_use'); // Atlas + $table->dropColumn('item_014_use'); // Contraption + $table->dropColumn('item_015_use'); // Crucible + $table->dropColumn('item_017_use'); // Crystal Infusion + $table->dropColumn('item_018_use'); // Dragonblood Contract + $table->dropColumn('item_020_use'); // Echo + $table->dropColumn('item_024_use'); // Flare + $table->dropColumn('item_025_use'); // Flare Gun + $table->dropColumn('item_026_use'); // Fountain + $table->dropColumn('item_028_use'); // Halcyon Chargers + $table->dropColumn('item_029_use'); // Halcyon Potion + $table->dropColumn('item_034_use'); // Journey Boots + $table->dropColumn('item_041_use'); // Minion Candy + $table->dropColumn('item_043_use'); // Nullwave Gauntlet + $table->dropColumn('item_048_use'); // Protector Contract + $table->dropColumn('item_049_use'); // Reflex Block + $table->dropColumn('item_050_use'); // Scout Trap + $table->dropColumn('item_053_use'); // Shiversteel + $table->dropColumn('item_057_use'); // Sprint Boots + $table->dropColumn('item_063_use'); // Travel Boots + $table->dropColumn('item_066_use'); // War Treads + $table->dropColumn('item_068_use'); // Weapon Infusion + $table->dropColumn('item_069_use'); // Taunt Kissy + $table->dropColumn('item_070_use'); // Taunt + $table->dropColumn('item_071_use'); // Voice over Taunt + $table->dropColumn('item_072_use'); // Healing Flask + }); + + } +} diff --git a/migrations/2017_11_02_000000_PhaseItemGrantsInorder.php b/migrations/2017_11_02_000000_PhaseItemGrantsInorder.php new file mode 100644 index 0000000..787d30a --- /dev/null +++ b/migrations/2017_11_02_000000_PhaseItemGrantsInorder.php @@ -0,0 +1,28 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class PhaseItemGrantsInorder extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->binary('item_grants_inorder')->after('item_grants')->nullable(); + }); + } + + public function down() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->dropColumn('item_grants_inorder'); + }); + + } +} diff --git a/migrations/2017_11_05_000000_GPVampPhaseHeals.php b/migrations/2017_11_05_000000_GPVampPhaseHeals.php new file mode 100644 index 0000000..6769047 --- /dev/null +++ b/migrations/2017_11_05_000000_GPVampPhaseHeals.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class GPVampPhaseHeals extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->double("heal_heal_ally")->after("heal_healed_hero")->nullable(); + $table->double("heal_healed_ally")->after("heal_heal_ally")->nullable(); + $table->double("heal_rcvd_heal_ally")->after("heal_rcvd_healed_hero")->nullable(); + $table->double("heal_rcvd_healed_ally")->after("heal_rcvd_heal_ally")->nullable(); + $table->double("heal_rcvd_healed_vamp")->after("heal_rcvd_healed_hero")->nullable(); + }); + } + + public function down() + { + Schema::table('global_point_phase', function (Blueprint $table) { + $table->dropColumn("heal_heal_ally"); + $table->dropColumn("heal_healed_ally"); + $table->dropColumn("heal_rcvd_heal_ally"); + $table->dropColumn("heal_rcvd_healed_ally"); + $table->dropColumn("heal_rcvd_healed_vamp"); + }); + + } +} diff --git a/migrations/2017_11_05_000000_MatchApiIdOnPhase.php b/migrations/2017_11_05_000000_MatchApiIdOnPhase.php new file mode 100644 index 0000000..0c19b21 --- /dev/null +++ b/migrations/2017_11_05_000000_MatchApiIdOnPhase.php @@ -0,0 +1,28 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class MatchApiIdOnPhase extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->uuid('match_api_id')->after('participant_api_id')->index(); + }); + } + + public function down() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->dropColumn('match_api_id'); + }); + + } +} diff --git a/migrations/2017_11_05_000000_VampPhaseHeals.php b/migrations/2017_11_05_000000_VampPhaseHeals.php new file mode 100644 index 0000000..57a1974 --- /dev/null +++ b/migrations/2017_11_05_000000_VampPhaseHeals.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class VampPhaseHeals extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->double("heal_heal_ally")->after("heal_healed_hero")->nullable(); + $table->double("heal_healed_ally")->after("heal_heal_ally")->nullable(); + $table->double("heal_rcvd_heal_ally")->after("heal_rcvd_healed_hero")->nullable(); + $table->double("heal_rcvd_healed_ally")->after("heal_rcvd_heal_ally")->nullable(); + $table->double("heal_rcvd_healed_vamp")->after("heal_rcvd_healed_hero")->nullable(); + }); + } + + public function down() + { + Schema::table('participant_phases', function (Blueprint $table) { + $table->dropColumn("heal_heal_ally"); + $table->dropColumn("heal_healed_ally"); + $table->dropColumn("heal_rcvd_heal_ally"); + $table->dropColumn("heal_rcvd_healed_ally"); + $table->dropColumn("heal_rcvd_healed_vamp"); + }); + + } +} diff --git a/migrations/2017_11_07_000000_Add_Lorelei.php b/migrations/2017_11_07_000000_Add_Lorelei.php new file mode 100644 index 0000000..16bd699 --- /dev/null +++ b/migrations/2017_11_07_000000_Add_Lorelei.php @@ -0,0 +1,47 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddLorelei extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Lorelai', + 'api_name' => '*Lorelai*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.10', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_11_07_000000_Add_Series_Patch_210.php b/migrations/2017_11_07_000000_Add_Series_Patch_210.php new file mode 100644 index 0000000..8cb1a94 --- /dev/null +++ b/migrations/2017_11_07_000000_Add_Series_Patch_210.php @@ -0,0 +1,56 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch210 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.9') + ->update([ + 'end' => new DateTime('2017-11-08 18:00:00') + ]); + + DB::table('series') + ->update([ + 'currentPatch' => 0 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.10', + 'dimension_on' => 'player', + 'start'=> new DateTime('2017-11-08 18:00:00'), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.10', + 'dimension_on' => 'global', + 'start'=> new DateTime('2017-11-08 18:00:00'), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_12_00_000000_add_standard_mode_names.php b/migrations/2017_12_00_000000_add_standard_mode_names.php new file mode 100644 index 0000000..f7c7c08 --- /dev/null +++ b/migrations/2017_12_00_000000_add_standard_mode_names.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddStandardModeNames extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('game_mode')->insert([ + 'name' => 'all' + ]); + DB::table('game_mode')->insert([ + 'name' => 'casual' + ]); + DB::table('game_mode')->insert([ + 'name' => 'ranked' + ]); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_12_04_000000_Add_Season_Winter_2017.php b/migrations/2017_12_04_000000_Add_Season_Winter_2017.php new file mode 100644 index 0000000..5916598 --- /dev/null +++ b/migrations/2017_12_04_000000_Add_Season_Winter_2017.php @@ -0,0 +1,42 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeasonWinter2017 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Autumn 2017') + ->update([ + 'end' => new DateTime('2017-12-05 16:00:00') + ]); + + DB::table('series')->insert([ + 'name' => 'Winter 2017', + 'dimension_on' => 'global', + 'start'=> new DateTime('2017-12-05 16:00:00'), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 0 + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_12_04_000000_Add_Series_Patch_211.php b/migrations/2017_12_04_000000_Add_Series_Patch_211.php new file mode 100644 index 0000000..b6c61fc --- /dev/null +++ b/migrations/2017_12_04_000000_Add_Series_Patch_211.php @@ -0,0 +1,56 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch211 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.10') + ->update([ + 'end' => new DateTime('2017-12-05 16:00:00') + ]); + + DB::table('series') + ->update([ + 'currentPatch' => 0 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.11', + 'dimension_on' => 'player', + 'start'=> new DateTime('2017-12-05 16:00:00'), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.11', + 'dimension_on' => 'global', + 'start'=> new DateTime('2017-12-05 16:00:00'), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_12_04_000000_Add_Varya.php b/migrations/2017_12_04_000000_Add_Varya.php new file mode 100644 index 0000000..5cdda61 --- /dev/null +++ b/migrations/2017_12_04_000000_Add_Varya.php @@ -0,0 +1,47 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddVarya extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Varya', + 'api_name' => '*Varya*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.11', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_12_07_000000_add_rank_points.php b/migrations/2017_12_07_000000_add_rank_points.php new file mode 100644 index 0000000..00fed51 --- /dev/null +++ b/migrations/2017_12_07_000000_add_rank_points.php @@ -0,0 +1,45 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddRankPoints extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('player', function (Blueprint $table) { + $table->integer("rank_points_ranked")->nullable(); + $table->integer("rank_points_blitz")->nullable(); + $table->integer("played_ranked")->nullable(); + $table->integer("played_casual")->nullable(); + $table->integer("played_blitz")->nullable(); + $table->integer("played_aral")->nullable(); + $table->string("guild_tag")->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('player', function (Blueprint $table) { + $table->dropColumn("rank_points_ranked"); + $table->dropColumn("rank_points_blitz"); + $table->dropColumn("played_ranked"); + $table->dropColumn("played_casual"); + $table->dropColumn("played_blitz"); + $table->dropColumn("played_aral"); + $table->dropColumn("guild_tag"); + }); + } +} diff --git a/migrations/2017_12_13_000000_update_rank_points.php b/migrations/2017_12_13_000000_update_rank_points.php new file mode 100644 index 0000000..87d0173 --- /dev/null +++ b/migrations/2017_12_13_000000_update_rank_points.php @@ -0,0 +1,51 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class UpdateRankPoints extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('player', function (Blueprint $table) { + $table->dropColumn("rank_points_ranked"); + $table->dropColumn("rank_points_blitz"); + $table->dropColumn("lifetime_gold"); + $table->dropColumn("elo"); + }); + + Schema::table('player', function (Blueprint $table) { + $table->double("rank_points_ranked")->nullable(); + $table->double("rank_points_blitz")->nullable(); + $table->integer("played_blitz_rounds")->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('player', function (Blueprint $table) { + $table->dropColumn("rank_points_ranked")->nullable(); + $table->dropColumn("rank_points_blitz")->nullable(); + $table->dropColumn("played_blitz_rounds")->nullable(); + }); + + Schema::table('player', function (Blueprint $table) { + $table->integer("rank_points_ranked"); + $table->integer("rank_points_blitz"); + $table->double("lifetime_gold"); + $table->double("elo"); + }); + } +} diff --git a/migrations/2017_12_21_000000_add_mode_names.php b/migrations/2017_12_21_000000_add_mode_names.php new file mode 100644 index 0000000..6eb51d8 --- /dev/null +++ b/migrations/2017_12_21_000000_add_mode_names.php @@ -0,0 +1,51 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddModeNames extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('game_mode')->insert([ + 'name' => 'priv_blind' + ]); + DB::table('game_mode')->insert([ + 'name' => 'priv_draft' + ]); + DB::table('game_mode')->insert([ + 'name' => 'blitz' + ]); + DB::table('game_mode')->insert([ + 'name' => 'priv_blitz' + ]); + DB::table('game_mode')->insert([ + 'name' => 'br' + ]); + DB::table('game_mode')->insert([ + 'name' => 'priv_br' + ]); + DB::table('game_mode')->insert([ + 'name' => 'onslaught' + ]); + DB::table('game_mode')->insert([ + 'name' => 'priv_onslaught' + ]); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2017_12_21_000000_remove_trueskill_from_playerpoint.php b/migrations/2017_12_21_000000_remove_trueskill_from_playerpoint.php new file mode 100644 index 0000000..ca850c0 --- /dev/null +++ b/migrations/2017_12_21_000000_remove_trueskill_from_playerpoint.php @@ -0,0 +1,43 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class RemoveTrueskillFromPlayerPoint extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('player_point', function (Blueprint $table) { + $table->dropColumn("trueskill_max"); + $table->dropColumn("trueskill_ranked_max"); + $table->dropColumn("trueskill_delta"); + $table->dropColumn("trueskill_mu"); + $table->dropColumn("trueskill_sigma"); + $table->dropColumn("elo"); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('player_point', function (Blueprint $table) { + $table->double("trueskill_max"); + $table->double("trueskill_ranked_max"); + $table->double("trueskill_delta"); + $table->double("trueskill_mu"); + $table->double("trueskill_sigma"); + $table->double("elo"); + }); + } +} diff --git a/migrations/2017_12_23_000000_add_queue_trueskills.php b/migrations/2017_12_23_000000_add_queue_trueskills.php new file mode 100644 index 0000000..1c9cbee --- /dev/null +++ b/migrations/2017_12_23_000000_add_queue_trueskills.php @@ -0,0 +1,59 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddQueueTrueskills extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_items', function (Blueprint $table) { + $table->double("trueskill_casual_mu")->nullable(); + $table->double("trueskill_casual_sigma")->nullable(); + $table->double("trueskill_blitz_mu")->nullable(); + $table->double("trueskill_blitz_sigma")->nullable(); + $table->double("trueskill_br_mu")->nullable(); + $table->double("trueskill_br_sigma")->nullable(); + }); + Schema::table('player', function (Blueprint $table) { + $table->double("trueskill_casual_mu")->nullable(); + $table->double("trueskill_casual_sigma")->nullable(); + $table->double("trueskill_blitz_mu")->nullable(); + $table->double("trueskill_blitz_sigma")->nullable(); + $table->double("trueskill_br_mu")->nullable(); + $table->double("trueskill_br_sigma")->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant_items', function (Blueprint $table) { + $table->dropColumn("trueskill_casual_mu"); + $table->dropColumn("trueskill_casual_sigma"); + $table->dropColumn("trueskill_blitz_mu"); + $table->dropColumn("trueskill_blitz_sigma"); + $table->dropColumn("trueskill_br_mu"); + $table->dropColumn("trueskill_br_sigma"); + }); + Schema::table('player', function (Blueprint $table) { + $table->dropColumn("trueskill_casual_mu"); + $table->dropColumn("trueskill_casual_sigma"); + $table->dropColumn("trueskill_blitz_mu"); + $table->dropColumn("trueskill_blitz_sigma"); + $table->dropColumn("trueskill_br_mu"); + $table->dropColumn("trueskill_br_sigma"); + }); + } +} diff --git a/migrations/2017_12_30_000001_Modify_Hero_To_Have_Images.php b/migrations/2017_12_30_000001_Modify_Hero_To_Have_Images.php new file mode 100644 index 0000000..d9ca0b1 --- /dev/null +++ b/migrations/2017_12_30_000001_Modify_Hero_To_Have_Images.php @@ -0,0 +1,37 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class ModifyHeroToHaveImages extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('hero', function (Blueprint $table) { + $table->string('avatar_location'); + }); + + DB::table('hero') + ->update([ + 'avatar_location' => DB::raw("concat('/images/heroes/avatar/', lower(name), '.png')") + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('hero', function (Blueprint $table) { + $table->dropColumn('avatar_location'); + }); + } +} diff --git a/migrations/2017_12_30_000002_Add_Weekly_Series_Seed.php b/migrations/2017_12_30_000002_Add_Weekly_Series_Seed.php new file mode 100644 index 0000000..7852ba9 --- /dev/null +++ b/migrations/2017_12_30_000002_Add_Weekly_Series_Seed.php @@ -0,0 +1,58 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddWeeklySeriesSeed extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + $now = Carbon::create(2018, 1, 3, 0, 0, 0); + $nextweek = $now->copy()->addWeek()->subMinute(); + + for($i = 0; $i <= 52; $i++) { + $point_name = $now->year . '-' . $now->month . '-' . $now->day; + DB::table('series')->insert([ + 'name' => $point_name, + 'dimension_on' => 'global', + 'start'=> $now, + 'end'=> $nextweek, + 'show_in_web' => false + ]); + + $now = $now->addWeek(); + $nextweek = $nextweek->addWeek(); + } + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + $now = Carbon::createFromDate(2018, 1, 3, 0, 0, 0); + $nextweek = $now->copy()->addWeek(); + + for($i = 0; $i <= 52; $i++) { + $point_name = $now->year . '-' . $now->month . '-' . $now->day; + $sql = 'delete from series where name = "' . $point_name . '"'; + DB::connection()->getPdo()->exec($sql); + + $now = $now->addWeek(); + $nextweek = $nextweek->addWeek(); + } + } +} + + diff --git a/migrations/2017_12_31_000001_Create_League_Table.php b/migrations/2017_12_31_000001_Create_League_Table.php new file mode 100644 index 0000000..b78e789 --- /dev/null +++ b/migrations/2017_12_31_000001_Create_League_Table.php @@ -0,0 +1,42 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateLeagueTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_league', function (Blueprint $table) { + $table->increments('id'); + $table->string('slug', 10); + + $table->string('name'); + $table->string('tag_line_1')->nullable(); + $table->string('tag_line_2')->nullable(); + $table->enum('status', ['active', 'in-active']); + $table->timestampTz('start')->nullable(); + $table->timestampTz('end')->nullable(); + + $table->string('logo_url')->nullable(); + $table->string('background_url')->nullable(); + $table->string('theme_name')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_league'); + } +} diff --git a/migrations/2017_12_31_000002_Create_Season_Table.php b/migrations/2017_12_31_000002_Create_Season_Table.php new file mode 100644 index 0000000..bbf29d4 --- /dev/null +++ b/migrations/2017_12_31_000002_Create_Season_Table.php @@ -0,0 +1,48 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateSeasonTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_season', function (Blueprint $table) { + $table->increments('id'); + $table->string('slug', 10); + + $table->integer('league_id')->index(); // FK to League table. + + $table->string('name'); + $table->enum('status', ['planned', 'pre-season', 'in-season', 'post-season']); + $table->timestampTz('start')->nullable(); + $table->timestampTz('end')->nullable(); + + $table->string('prize_pool')->nullable(); + + // registration cols. + $table->boolean('roster_locked')->nullable(); + $table->boolean('registration_open')->nullable(); + $table->string('regis_intro', 1000)->nullable(); + $table->string('regis_requirements', 1000)->nullable(); + $table->string('regis_link_intro', 255)->nullable(); + $table->string('regis_link_rules', 255)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_season'); + } +} diff --git a/migrations/2017_12_31_000003_Create_Team_Table.php b/migrations/2017_12_31_000003_Create_Team_Table.php new file mode 100644 index 0000000..143922f --- /dev/null +++ b/migrations/2017_12_31_000003_Create_Team_Table.php @@ -0,0 +1,38 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateTeamTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_team', function (Blueprint $table) { + $table->increments('id'); + $table->string('name', 20); + $table->string('slug', 10); + + $table->string('shard_id')->nullable(); + $table->timestamp('created_at')->nullable(); + + $table->enum('status', ['active', 'inactive']); + $table->enum('type', ['team', 'guild']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_team'); + } +} diff --git a/migrations/2017_12_31_000004_Create_User_Team_Table.php b/migrations/2017_12_31_000004_Create_User_Team_Table.php new file mode 100644 index 0000000..ffcb1aa --- /dev/null +++ b/migrations/2017_12_31_000004_Create_User_Team_Table.php @@ -0,0 +1,37 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateUserTeamTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_team_user', function (Blueprint $table) { + $table->increments('id'); + + $table->integer('user_id')->index(); // FK to Team table. + $table->integer('vg_team_id')->index(); // FK to League->Season table. + + $table->enum('membership', ['admin', 'captain', 'member', 'former']); + $table->timestamp('joined_on')->default(DB::raw('CURRENT_TIMESTAMP')); + $table->timestamp('left_on')->default(DB::raw('CURRENT_TIMESTAMP')); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_team_user'); + } +} diff --git a/migrations/2017_12_31_000006_Create_User_League_Table.php b/migrations/2017_12_31_000006_Create_User_League_Table.php new file mode 100644 index 0000000..f29c031 --- /dev/null +++ b/migrations/2017_12_31_000006_Create_User_League_Table.php @@ -0,0 +1,37 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateUserLeagueTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_league_user', function (Blueprint $table) { + $table->increments('id'); + + $table->integer('user_id')->index(); + $table->integer('vg_league_id')->index(); + + $table->enum('membership', ['admin', 'moderator', 'member']); + $table->timestamp('joined_on')->default(DB::raw('CURRENT_TIMESTAMP')); + $table->timestamp('left_on')->default(DB::raw('CURRENT_TIMESTAMP')); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_league_user'); + } +} diff --git a/migrations/2017_12_31_000007_Create_Player_Team_Table.php b/migrations/2017_12_31_000007_Create_Player_Team_Table.php new file mode 100644 index 0000000..7f9cb1f --- /dev/null +++ b/migrations/2017_12_31_000007_Create_Player_Team_Table.php @@ -0,0 +1,38 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreatePlayerTeamTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_player_team', function (Blueprint $table) { + $table->increments('id'); + + $table->integer('player_id')->index(); + $table->integer('vg_team_id')->index(); + + $table->enum('membership', ['member', 'former']); + $table->enum('role', ['carry', 'captain', 'jungler']); + $table->timestamp('joined_on')->default(DB::raw('CURRENT_TIMESTAMP')); + $table->timestamp('left_on')->default(DB::raw('CURRENT_TIMESTAMP')); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_player_team'); + } +} diff --git a/migrations/2017_12_31_000008_Create_Season_Team_Table.php b/migrations/2017_12_31_000008_Create_Season_Team_Table.php new file mode 100644 index 0000000..ae57947 --- /dev/null +++ b/migrations/2017_12_31_000008_Create_Season_Team_Table.php @@ -0,0 +1,48 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateSeasonTeamTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_season_team', function (Blueprint $table) { + $table->increments('id'); + + $table->integer('vg_season_id')->index(); + $table->integer('vg_team_id')->index(); + + $table->enum('status', ['pending', 'approved', 'rejected']); + $table->timestamp('joined_on')->default(DB::raw('CURRENT_TIMESTAMP')); + $table->timestamp('left_on')->default(DB::raw('CURRENT_TIMESTAMP')); + + $table->integer('game_mode')->index(); // FK to Game Mode table. + + // stats (use game_mode to identity various tournie stats) + // any player based stat is averaged + $table->integer('played'); + $table->integer('wins'); + $table->double('perf_score'); // dont have a formula for it yet + + $table->double('cspm'); // cs/min + $table->double('gpm'); // gold/min + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_season_team'); + } +} diff --git a/migrations/2017_12_31_000100_Seed_League_Teams.php b/migrations/2017_12_31_000100_Seed_League_Teams.php new file mode 100644 index 0000000..cf4f598 --- /dev/null +++ b/migrations/2017_12_31_000100_Seed_League_Teams.php @@ -0,0 +1,82 @@ + <?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SeedLeagueTeams extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + $leagues = [ + [ + 'slug' => 'nacl', + 'name' => 'NACL', + 'status' => 'Active', + 'logo_url' => '/images/leagues/nacl/logo.png' + ], + ]; + + $seasons = [ + [ + 'slug' => 'season-5', + 'name' => 'Season 5', + 'status' => 'planned', + 'league_id' => '1', + ], + ]; + + $league_users = [ + [ + 'user_id' => 1, + 'vg_league_id' => 1, + 'membership' => 'admin', + ], + ]; + + $teams = [ + [ + 'slug' => 'vain', + 'name' => 'Best API Devs', + 'shard_id' => '', + 'status' => 'Active', + 'type' => 'Team', + ], + ]; + + $team_users = [ + [ + 'user_id' => 1, + 'vg_team_id' => 1, + 'membership' => 'captain', + ], + ]; + + DB::connection()->table('vg_league')->insert($leagues); + DB::connection()->table('vg_season')->insert($seasons); + DB::connection()->table('vg_league_user')->insert($league_users); + + DB::connection()->table('vg_team')->insert($teams); + DB::connection()->table('vg_team_user')->insert($team_users); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + DB::connection()->table('vg_league')->delete(); + DB::connection()->table('vg_season')->delete(); + DB::connection()->table('vg_team_user')->delete(); + + DB::connection()->table('vg_team')->delete(); + DB::connection()->table('vg_team_user')->delete(); + } +} diff --git a/migrations/2018_01_04_000001_Create_Localization_Table.php b/migrations/2018_01_04_000001_Create_Localization_Table.php new file mode 100644 index 0000000..e00c99f --- /dev/null +++ b/migrations/2018_01_04_000001_Create_Localization_Table.php @@ -0,0 +1,33 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateLocalizationTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('vg_localization', function (Blueprint $table) { + $table->string('key', 100); + $table->string('version', 20); + + $table->string('en', 255); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vg_localization'); + } +} diff --git a/migrations/2018_01_10_000001_Setup_Locale_Keys_V1.php b/migrations/2018_01_10_000001_Setup_Locale_Keys_V1.php new file mode 100644 index 0000000..cb1fc14 --- /dev/null +++ b/migrations/2018_01_10_000001_Setup_Locale_Keys_V1.php @@ -0,0 +1,140 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class SetupLocaleKeysV1 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + $keys = [ + [ 'key' => 'draft.title', + 'version' => 'v1.0.0', + 'en' => 'Vainglory Double Ban Draft' ], + [ 'key' => 'draft.og.description', + 'version' => 'v1.0.0', + 'en' => 'Vainglory Double Ban Drafting, Statistics, Meta' ], + [ 'key' => 'draft.team.a', + 'version' => 'v1.0.0', + 'en' => 'Team A' ], + [ 'key' => 'draft.team.b', + 'version' => 'v1.0.0', + 'en' => 'Team B' ], + [ 'key' => 'draft.cta.init', + 'version' => 'v1.0.0', + 'en' => 'Initialize' ], + [ 'key' => 'draft.step.init', + 'version' => 'v1.0.0', + 'en' => 'Initialize' ], + [ 'key' => 'draft.step.share', + 'version' => 'v1.0.0', + 'en' => 'Share' ], + [ 'key' => 'draft.step.start', + 'version' => 'v1.0.0', + 'en' => 'Start' ], + [ 'key' => 'draft.step.started', + 'version' => 'v1.0.0', + 'en' => 'In Progress' ], + [ 'key' => 'draft.step.ended', + 'version' => 'v1.0.0', + 'en' => 'Ended' ], + [ 'key' => 'draft.share.link', + 'version' => 'v1.0.0', + 'en' => 'Copy and Share the link with team' ], + + + [ 'key' => 'home.title', + 'version' => 'v1.0.0', + 'en' => 'VainSocial: Player Profile and Preferences' ], + [ 'key' => 'home.og.description', + 'version' => 'v1.0.0', + 'en' => 'Player Profile and Preferences'], + [ 'key' => 'home.widget.team.header', + 'version' => 'v1.0.0', + 'en' => 'Your Teams' ], + [ 'key' => 'home.widget.create-team.header', + 'version' => 'v1.0.0', + 'en' => 'Create a new Team' ], + [ 'key' => 'team.create.error.slug-in-use', + 'version' => 'v1.0.0', + 'en' => 'Slug has already been taken.' ], + [ 'key' => 'team.create.success', + 'version' => 'v1.0.0', + 'en' => 'Team has been created Successfully.' ], + [ 'key' => 'home.widget.league.header', + 'version' => 'v1.0.0', + 'en' => 'Your Leagues' ], + + [ 'key' => 'team.membership.captain', + 'version' => 'v1.0.0', + 'en' => 'Captain' ], + [ 'key' => 'team.label.name', + 'version' => 'v1.0.0', + 'en' => 'Name' ], + [ 'key' => 'team.label.slug', + 'version' => 'v1.0.0', + 'en' => 'Slug' ], + [ 'key' => 'team.label.region', + 'version' => 'v1.0.0', + 'en' => 'Region' ], + + [ 'key' => 'common.cta.clear', + 'version' => 'v1.0.0', + 'en' => 'Clear' ], + [ 'key' => 'common.cta.submit', + 'version' => 'v1.0.0', + 'en' => 'Submit' ], + [ 'key' => 'common.cta.join', + 'version' => 'v1.0.0', + 'en' => 'Join' ], + [ 'key' => 'common.cta.copy', + 'version' => 'v1.0.0', + 'en' => 'Copy' ], + [ 'key' => 'common.label.team', + 'version' => 'v1.0.0', + 'en' => 'Team' ], + [ 'key' => 'common.label.joined', + 'version' => 'v1.0.0', + 'en' => 'Joined' ], + + + [ 'key' => 'region.chn', + 'version' => 'v1.0.0', + 'en' => 'China' ], + [ 'key' => 'region.na', + 'version' => 'v1.0.0', + 'en' => 'NA' ], + [ 'key' => 'region.eu', + 'version' => 'v1.0.0', + 'en' => 'EU' ], + [ 'key' => 'region.ea', + 'version' => 'v1.0.0', + 'en' => 'EA' ], + [ 'key' => 'region.sa', + 'version' => 'v1.0.0', + 'en' => 'SA' ], + [ 'key' => 'region.sg', + 'version' => 'v1.0.0', + 'en' => 'SEA' ], + ]; + + + DB::connection()->table('vg_localization')->insert($keys); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + DB::connection()->table('vg_localization')->where('version', '=', 'v1.0.0')->delete(); + } +} diff --git a/migrations/2018_01_27_000000_Add_Series_Patch_212.php b/migrations/2018_01_27_000000_Add_Series_Patch_212.php new file mode 100644 index 0000000..1dba147 --- /dev/null +++ b/migrations/2018_01_27_000000_Add_Series_Patch_212.php @@ -0,0 +1,56 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AddSeriesPatch212 extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('series') + ->where('name', 'Patch 2.11') + ->update([ + 'end' => new DateTime('2018-01-31 16:00:00') + ]); + + DB::table('series') + ->update([ + 'currentPatch' => 0 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.12', + 'dimension_on' => 'player', + 'start'=> new DateTime('2018-01-31 16:00:00'), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.12', + 'dimension_on' => 'global', + 'start'=> new DateTime('2018-01-31 16:00:00'), + 'end' => Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true, + 'currentPatch' => 1 + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2018_01_27_000000_add_5v5_items.php b/migrations/2018_01_27_000000_add_5v5_items.php new file mode 100644 index 0000000..f97d65e --- /dev/null +++ b/migrations/2018_01_27_000000_add_5v5_items.php @@ -0,0 +1,69 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class Add5V5Items extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('item')->insert([ + 'api_id' => '*Item_VisionTotem*', + 'series' => '0', + 'name' => 'Scout Cam', + 'is_activable' => '0' + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_TotemMultiplier*', + 'series' => '0', + 'name' => 'Multi-Cam', + 'is_activable' => '0' + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_TotemEnhancer*', + 'series' => '0', + 'name' => 'Boosted Cam', + 'is_activable' => '0' + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_TotemBuffer*', + 'series' => '0', + 'name' => 'Buffed Cam', + 'is_activable' => '0' + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_FlareGun_Beta*', + 'series' => '0', + 'name' => 'Flare Gun beta', + 'is_activable' => '0' + ]); + + DB::table('item')->insert([ + 'api_id' => '*Item_WarpGenerator*', + 'series' => '0', + 'name' => 'Teleport Boots', + 'is_activable' => '0' + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2018_01_27_000000_add_5v5_mode_names.php b/migrations/2018_01_27_000000_add_5v5_mode_names.php new file mode 100644 index 0000000..47c6ea9 --- /dev/null +++ b/migrations/2018_01_27_000000_add_5v5_mode_names.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class Add5V5ModeNames extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('game_mode')->insert([ + 'name' => '5v5_casual' + ]); + DB::table('game_mode')->insert([ + 'name' => '5v5_ranked' + ]); + DB::table('game_mode')->insert([ + 'name' => 'priv_5v5_blind' + ]); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/migrations/2018_02_01_000000_game_mode_enhancement.php b/migrations/2018_02_01_000000_game_mode_enhancement.php new file mode 100644 index 0000000..5febca0 --- /dev/null +++ b/migrations/2018_02_01_000000_game_mode_enhancement.php @@ -0,0 +1,136 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class GameModeEnhancement extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('game_mode', function (Blueprint $table) { + $table->enum('type', ['3v3', 'brawl', '5v5', 'none']); + $table->enum('public_mode_types', ['3v3', 'brawl', '5v5', 'none']); + $table->integer('display_rank'); + }); + + DB::table('game_mode') + ->where('name', 'all') + ->update([ + 'type' => 'none' + ]); + + DB::table('game_mode') + ->whereIn('name', ['casual', 'ranked', 'priv_blind', 'priv_draft']) + ->update([ + 'type' => '3v3' + ]); + + DB::table('game_mode') + ->whereIn('name', ['5v5_casual', '5v5_ranked', 'priv_5v5_blind']) + ->update([ + 'type' => '5v5' + ]); + + DB::table('game_mode') + ->whereIn('name', ['blitz', 'br', 'onslaught', 'priv_blitz', 'priv_br', 'priv_onslaught']) + ->update([ + 'type' => 'brawl' + ]); + + + DB::table('game_mode') + ->whereIn('name', ['all', 'priv_blind', 'priv_draft', 'priv_5v5_blind', 'priv_blitz', 'priv_br', 'priv_onslaught']) + ->update([ + 'public_mode_types' => 'none' + ]); + + DB::table('game_mode') + ->whereIn('name', ['casual', 'ranked']) + ->update([ + 'public_mode_types' => '3v3' + ]); + + DB::table('game_mode') + ->whereIn('name', ['5v5_casual', '5v5_ranked']) + ->update([ + 'public_mode_types' => '5v5' + ]); + + DB::table('game_mode') + ->whereIn('name', ['blitz', 'br', 'onslaught']) + ->update([ + 'public_mode_types' => 'brawl' + ]); + + // update display ranks for all modes + DB::table('game_mode') + ->where('name', 'all') + ->update([ + 'display_rank' => 1 + ]); + + DB::table('game_mode') + ->where('name', 'casual') + ->update([ + 'display_rank' => 2 + ]); + + DB::table('game_mode') + ->where('name', 'ranked') + ->update([ + 'display_rank' => 3 + ]); + + DB::table('game_mode') + ->where('name', '5v5_casual') + ->update([ + 'display_rank' => 4 + ]); + + DB::table('game_mode') + ->where('name', '5v5_ranked') + ->update([ + 'display_rank' => 5 + ]); + + DB::table('game_mode') + ->where('name', 'br') + ->update([ + 'display_rank' => 6 + ]); + + DB::table('game_mode') + ->where('name', 'blitz') + ->update([ + 'display_rank' => 7 + ]); + + DB::table('game_mode') + ->where('name', 'onslaught') + ->update([ + 'display_rank' => 8 + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('game_mode', function (Blueprint $table) { + $table->dropColumn("type"); + $table->dropColumn("public_mode_types"); + $table->dropColumn("display_rank"); + }); + } +} diff --git a/migrations/2018_02_01_000000_items_modify_selective_show.php b/migrations/2018_02_01_000000_items_modify_selective_show.php new file mode 100644 index 0000000..2c63217 --- /dev/null +++ b/migrations/2018_02_01_000000_items_modify_selective_show.php @@ -0,0 +1,51 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class ItemsModifySelectiveShow extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('item', function (Blueprint $table) { + $table->boolean("show_in_build")->nullable(); + }); + + DB::table('item') + ->update([ + 'show_in_build' => true + ]); + + DB::table('item') + ->where('name', 'Healing Flask') + ->update([ + 'show_in_build' => false + ]); + + DB::table('item') + ->where('name', 'Scout Cam') + ->update([ + 'show_in_build' => false + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('item', function (Blueprint $table) { + $table->dropColumn("show_in_build"); + }); + } +} diff --git a/migrations/2018_02_01_000010_add_5v5_trueskills.php b/migrations/2018_02_01_000010_add_5v5_trueskills.php new file mode 100644 index 0000000..63251a9 --- /dev/null +++ b/migrations/2018_02_01_000010_add_5v5_trueskills.php @@ -0,0 +1,68 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class Add5v5Trueskills extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('participant_items', function (Blueprint $table) { + $table->double("trueskill_3v3_mu")->nullable(); + $table->double("trueskill_3v3_sigma")->nullable(); + $table->double("trueskill_5v5_mu")->nullable(); + $table->double("trueskill_5v5_sigma")->nullable(); + $table->double("trueskill_5v5_casual_mu")->nullable(); + $table->double("trueskill_5v5_casual_sigma")->nullable(); + $table->double("trueskill_5v5_ranked_mu")->nullable(); + $table->double("trueskill_5v5_ranked_sigma")->nullable(); + }); + + Schema::table('player', function (Blueprint $table) { + $table->double("trueskill_3v3_mu")->nullable(); + $table->double("trueskill_3v3_sigma")->nullable(); + $table->double("trueskill_5v5_mu")->nullable(); + $table->double("trueskill_5v5_sigma")->nullable(); + $table->double("trueskill_5v5_casual_mu")->nullable(); + $table->double("trueskill_5v5_casual_sigma")->nullable(); + $table->double("trueskill_5v5_ranked_mu")->nullable(); + $table->double("trueskill_5v5_ranked_sigma")->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participant_items', function (Blueprint $table) { + $table->dropColumn("trueskill_3v3_mu"); + $table->dropColumn("trueskill_3v3_sigma"); + $table->dropColumn("trueskill_5v5_mu"); + $table->dropColumn("trueskill_5v5_sigma"); + $table->dropColumn("trueskill_5v5_casual_mu"); + $table->dropColumn("trueskill_5v5_casual_sigma"); + $table->dropColumn("trueskill_5v5_ranked_mu"); + $table->dropColumn("trueskill_5v5_ranked_sigma"); + }); + Schema::table('player', function (Blueprint $table) { + $table->dropColumn("trueskill_3v3_mu"); + $table->dropColumn("trueskill_3v3_sigma"); + $table->dropColumn("trueskill_5v5_mu"); + $table->dropColumn("trueskill_5v5_sigma"); + $table->dropColumn("trueskill_5v5_casual_mu"); + $table->dropColumn("trueskill_5v5_casual_sigma"); + $table->dropColumn("trueskill_5v5_ranked_mu"); + $table->dropColumn("trueskill_5v5_ranked_sigma"); + }); + } +} diff --git a/migrations/2018_02_01_000020_league_select_draft_strat.php b/migrations/2018_02_01_000020_league_select_draft_strat.php new file mode 100644 index 0000000..e0fb6eb --- /dev/null +++ b/migrations/2018_02_01_000020_league_select_draft_strat.php @@ -0,0 +1,35 @@ +<?php + +use Carbon\Carbon; + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class LeagueSelectDraftStrat extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('vg_league', function (Blueprint $table) { + $table->integer("draft_strat")->nullable(); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('vg_league', function (Blueprint $table) { + $table->dropColumn("draft_strat"); + }); + } +} diff --git a/seeds/BuildSeeder.php b/seeds/BuildSeeder.php new file mode 100644 index 0000000..2e633f3 --- /dev/null +++ b/seeds/BuildSeeder.php @@ -0,0 +1,290 @@ +<?php + +use Illuminate\Database\Seeder; + +class BuildSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + DB::table('build')->insert([ + 'id' => 1, + 'name' => 'all', + 'dimension_on' => 'global' + ]); + + DB::table('build')->insert([ + 'id' => 2, + 'name' => 'BP TM TM', + 'dimension_on' => 'global', + 'item_1' => 9, + 'item_2' => 64, + 'item_1_count' => 1, + 'item_2_count' => 2, + ]); + + DB::table('build')->insert([ + 'id' => 3, + 'name' => 'TB BP TM', + 'dimension_on' => 'global', + 'item_1' => 61, + 'item_2' => 9, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 4, + 'name' => 'SB BP TT', + 'dimension_on' => 'global', + 'item_1' => 9, + 'item_2' => 56, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 5, + 'name' => 'SM BP TM', + 'dimension_on' => 'global', + 'item_1' => 51, + 'item_2' => 9, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 6, + 'name' => 'SM BP SB', + 'dimension_on' => 'global', + 'item_1' => 51, + 'item_2' => 9, + 'item_3' => 56, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 7, + 'name' => 'SB BP TM', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 64, + 'item_3' => 9, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 8, + 'name' => 'SB TM TM', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 64, + 'item_1_count' => 1, + 'item_2_count' => 2, + ]); + + DB::table('build')->insert([ + 'id' => 9, + 'name' => 'BP SM PS', + 'dimension_on' => 'global', + 'item_1' => 9, + 'item_2' => 51, + 'item_3' => 47, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 10, + 'name' => 'TB SB TM', + 'dimension_on' => 'global', + 'item_1' => 61, + 'item_2' => 56, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 11, + 'name' => 'SB PS BP', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 47, + 'item_3' => 9, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 12, + 'name' => 'TB SB SB', + 'dimension_on' => 'global', + 'item_1' => 61, + 'item_2' => 56, + 'item_1_count' => 1, + 'item_2_count' => 2, + ]); + + DB::table('build')->insert([ + 'id' => 13, + 'name' => 'SB TT TM', + 'dimension_on' => 'global', + 'item_1' => 56, + 'item_2' => 62, + 'item_3' => 64, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 14, + 'name' => 'SM TT SB', + 'dimension_on' => 'global', + 'item_1' => 51, + 'item_2' => 62, + 'item_3' => 56, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 15, + 'name' => 'AS BM AC', + 'dimension_on' => 'global', + 'item_1' => 2, + 'item_2' => 10, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 16, + 'name' => 'AS BM Eve', + 'dimension_on' => 'global', + 'item_1' => 2, + 'item_2' => 10, + 'item_3' => 23, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 17, + 'name' => 'Eve BM FB', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 27, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 18, + 'name' => 'SG BM Eve', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 52, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 19, + 'name' => 'SG CW BM', + 'dimension_on' => 'global', + 'item_1' => 52, + 'item_2' => 12, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 20, + 'name' => 'SC AS BM', + 'dimension_on' => 'global', + 'item_1' => 58, + 'item_2' => 2, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 21, + 'name' => 'AC FB BM', + 'dimension_on' => 'global', + 'item_1' => 3, + 'item_2' => 27, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + DB::table('build')->insert([ + 'id' => 22, + 'name' => 'AS SG BM', + 'dimension_on' => 'global', + 'item_1' => 2, + 'item_2' => 52, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 23, + 'name' => 'AC SG BM', + 'dimension_on' => 'global', + 'item_1' => 3, + 'item_2' => 52, + 'item_3' => 10, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + DB::table('build')->insert([ + 'id' => 24, + 'name' => 'Eve BM AC', + 'dimension_on' => 'global', + 'item_1' => 23, + 'item_2' => 10, + 'item_3' => 3, + 'item_1_count' => 1, + 'item_2_count' => 1, + 'item_3_count' => 1, + ]); + + } +} diff --git a/seeds/DatabaseSeeder.php b/seeds/DatabaseSeeder.php new file mode 100644 index 0000000..cb423b2 --- /dev/null +++ b/seeds/DatabaseSeeder.php @@ -0,0 +1,27 @@ +<?php + +use Illuminate\Database\Seeder; + +class DatabaseSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // $this->call(BuildSeeder::class); + // $this->call(KeysTableSeeder::class); + // $this->call(GameModeSeeder::class); + // $this->call(SeriesSeeder::class); + // $this->call(RoleSeeder::class); + // $this->call(RegionSeeder::class); + // $this->call(GamerSeeder::class); + // $this->call(ItemsSeeder::class); + // $this->call(HeroesSeeder::class); + // $this->call(FilterSeeder::class); + // $this->call(SkilltierSeeder::class); + + } +} diff --git a/seeds/FilterSeeder.php b/seeds/FilterSeeder.php new file mode 100644 index 0000000..0be216e --- /dev/null +++ b/seeds/FilterSeeder.php @@ -0,0 +1,32 @@ +<?php + +use Carbon\Carbon; +use Illuminate\Database\Seeder; + +class FilterSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('filter')->insert([ + 'id' => 1, + 'name' => 'all', + 'dimension_on' => 'player', + 'filter'=> '', + 'filter_hash'=> '' + ]); + + DB::table('filter')->insert([ + 'id' => 2, + 'name' => 'all', + 'dimension_on' => 'global', + 'filter'=> '', + 'filter_hash'=> '' + ]); + } +} diff --git a/seeds/GameModeSeeder.php b/seeds/GameModeSeeder.php new file mode 100644 index 0000000..765b739 --- /dev/null +++ b/seeds/GameModeSeeder.php @@ -0,0 +1,61 @@ +<?php + +use Illuminate\Database\Seeder; + +class GameModeSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('game_mode')->insert([ + 'id' => 1, + 'name' => 'all', + ]); + + DB::table('game_mode')->insert([ + 'id' => 2, + 'name' => 'casual', + ]); + + DB::table('game_mode')->insert([ + 'id' => 3, + 'name' => 'ranked', + ]); + + DB::table('game_mode')->insert([ + 'id' => 4, + 'name' => 'blitz_pvp_ranked', + ]); + + DB::table('game_mode')->insert([ + 'id' => 5, + 'name' => 'casual_aral', + ]); + + DB::table('game_mode')->insert([ + 'id' => 6, + 'name' => 'private', + ]); + + DB::table('game_mode')->insert([ + 'id' => 7, + 'name' => 'private_ranked', + ]); + + DB::table('game_mode')->insert([ + 'id' => 8, + 'name' => 'private_party_blitz_match', + ]); + + DB::table('game_mode')->insert([ + 'id' => 9, + 'name' => 'private_party_aral_match', + ]); + + } +} diff --git a/seeds/GamerSeeder.php b/seeds/GamerSeeder.php new file mode 100644 index 0000000..9cff0bc --- /dev/null +++ b/seeds/GamerSeeder.php @@ -0,0 +1,61 @@ +<?php + +use Illuminate\Database\Seeder; + +class GamerSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('gamer')->insert([ + 'player_api_id' => '44693bc0-9f02-11e5-ad28-06eb725f8a76', + 'name' => 'StormCallerSr', + 'vainsocial_status' => 'developer', + 'vainglory_ign' => 'StormCallerSr', + 'vainglory_shard_id' => 'sg', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '8f454688-2fe5-11e6-9433-06d90c28bf1a', + 'name' => 'shutterfly', + 'vainsocial_status' => 'developer', + 'vainglory_ign' => 'shutterfly', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => 'c865b42e-5b01-11e6-91aa-06fc87f1dd11', + 'name' => 'HellsByte', + 'vainsocial_status' => 'supporter', + 'vainglory_ign' => 'HellsByte', + 'vainglory_shard_id' => 'eu', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '1314f3f8-c53b-11e4-946e-06eb725f8a76', + 'name' => 'idmonfish', + 'vainsocial_status' => 'supporter', + 'vainglory_ign' => 'idmonfish', + 'vainglory_shard_id' => 'sg', + 'vainglory_is_pro' => false, + ]); + + DB::table('gamer')->insert([ + 'player_api_id' => '844b66aa-d359-11e6-b4c3-06ab1a16f8e5', + 'name' => 'kamaelxiii', + 'vainsocial_status' => 'supporter', + 'vainglory_ign' => 'kamaelxiii', + 'vainglory_shard_id' => 'sg', + 'vainglory_is_pro' => false, + ]); + + } +} diff --git a/seeds/HeroesSeeder.php b/seeds/HeroesSeeder.php new file mode 100644 index 0000000..1c906ab --- /dev/null +++ b/seeds/HeroesSeeder.php @@ -0,0 +1,717 @@ +<?php + +use Illuminate\Database\Seeder; +use Carbon\Carbon; + +class HeroesSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'all', + 'api_name' => '*All*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Vox', + 'api_name' => '*Vox*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Celeste', + 'api_name' => '*Celeste*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Catherine', + 'api_name' => '*Catherine*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Ringo', + 'api_name' => '*Ringo*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Adagio', + 'api_name' => '*Adagio*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Koshka', + 'api_name' => '*Koshka*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Glaive', + 'api_name' => '*Glaive*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Petal', + 'api_name' => '*Petal*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'SAW', + 'api_name' => '*SAW*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Krul', + 'api_name' => '*Krul*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Taka', + 'api_name' => '*Taka*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Skaarf', + 'api_name' => '*Skaarf*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Ardan', + 'api_name' => '*Ardan*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Fortress', + 'api_name' => '*Fortress*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Rona', + 'api_name' => '*Rona*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Skye', + 'api_name' => '*Skye*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Phinn', + 'api_name' => '*Phinn*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Blackfeather', + 'api_name' => '*Blackfeather*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Kestrel', + 'api_name' => '*Kestrel*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Reim', + 'api_name' => '*Reim*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Ozo', + 'api_name' => '*Ozo*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Alpha', + 'api_name' => '*Aplha*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Lance', + 'api_name' => '*Lance*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Samuel', + 'api_name' => '*Samuel*', + 'is_assassin' => false, + 'is_mage' => true, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Baron', + 'api_name' => '*Baron*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Gwen', + 'api_name' => '*Gwen*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => true, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Flicker', + 'api_name' => '*Flicker*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Idris', + 'api_name' => '*Idris*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Grumpjaw', + 'api_name' => '*Grumpjaw*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Lyra', + 'api_name' => '*Lyra*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => true, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => false, + 'is_captain' => true, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Joule', + 'api_name' => '*Joule*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => true, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.2', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Baptiste', + 'api_name' => '*Baptiste*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.4', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Grace', + 'api_name' => '*Grace*', + 'is_assassin' => false, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.6', + 'is_carry' => true, + 'is_jungler' => false, + 'is_captain' => false, + ]); + + DB::table('hero')->insert([ + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + 'name' => 'Reza', + 'api_name' => '*Reza*', + 'is_assassin' => true, + 'is_mage' => false, + 'is_protector' => false, + 'is_sniper' => false, + 'is_warrior' => false, + 'heroic_perk' => '', + 'ability_a' => '', + 'ability_b' => '', + 'ability_c' => '', + 'added_in_patch' => '2.7', + 'is_carry' => false, + 'is_jungler' => true, + 'is_captain' => false, + ]); + + } +} diff --git a/seeds/ItemsSeeder.php b/seeds/ItemsSeeder.php new file mode 100644 index 0000000..eb42ff8 --- /dev/null +++ b/seeds/ItemsSeeder.php @@ -0,0 +1,513 @@ +<?php + +use Illuminate\Database\Seeder; + +class ItemsSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1063_Item_Aegis*', + 'name' => 'Aegis', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1050_Item_Aftershock*', + 'name' => 'Aftershock', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1069_Item_AlternatingCurrent*', + 'name' => 'Alternating Current', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1057_Item_AtlasPauldron*', + 'name' => 'Atlas Pauldron', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1060_Item_BarbedNeedle*', + 'name' => 'Barbed Needle', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1010_Item_BlazingSalvo*', + 'name' => 'Blazing Salvo', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1039_Item_Bonesaw*', + 'name' => 'Bonesaw', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1059_Item_BookOfEulogies*', + 'name' => 'Book of Eulogies', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1067_Item_BreakingPoint*', + 'name' => 'Breaking Point', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1055_Item_BrokenMyth*', + 'name' => 'Broken Myth', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1028_Item_Chronograph*', + 'name' => 'Chronograph', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1029_Item_Clockwork*', + 'name' => 'Clockwork', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1022_Item_CoatOfPlates*', + 'name' => 'Coat of Plates', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1079_Item_Contraption*', + 'name' => 'Contraption', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1046_Item_Crucible*', + 'name' => 'Crucible', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1003_Item_CrystalBit*', + 'name' => 'Crystal Bit', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1053_Item_CrystalInfusion*', + 'name' => 'Crystal Infusion', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1085_Item_DragonbloodContract*', + 'name' => 'Dragonblood Contract', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1016_Item_Dragonheart*', + 'name' => 'Dragonheart', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1097_Item_Echo*', + 'name' => 'Echo', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1009_Item_EclipsePrism*', + 'name' => 'Eclipse Prism', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1025_Item_EnergyBattery*', + 'name' => 'Energy Battery', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1071_Item_EveOfHarvest*', + 'name' => 'Eve of Harvest', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1038_Item_Flare*', + 'name' => 'Flare', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1088_Item_Flaregun*', + 'name' => 'Flare Gun', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1045_Item_FountainOfRenewal*', + 'name' => 'Fountain of Renewal', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1044_Item_Frostburn*', + 'name' => 'Frostburn', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1087_Item_HalcyonChargers*', + 'name' => 'Halcyon Chargers', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1000_Item_HalcyonPotion*', + 'name' => 'Halcyon Potion', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1072_Item_HeavyPrism*', + 'name' => 'Heavy Prism', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1065_Item_HeavySteel*', + 'name' => 'Heavy Steel', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1026_Item_Hourglass*', + 'name' => 'Hourglass', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1073_Item_IronguardContract*', + 'name' => 'Ironguard Contract', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1047_Item_JourneyBoots*', + 'name' => 'Journey Boots', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1062_Item_KineticShield*', + 'name' => 'Kinetic Shield', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1064_Item_Lifespring*', + 'name' => 'Lifespring', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1017_Item_LightArmor*', + 'name' => 'Light Armor', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1061_Item_LightShield*', + 'name' => 'Light Shield', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1068_Item_LuckyStrike*', + 'name' => 'Lucky Strike', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1024_Item_MetalJacket*', + 'name' => 'Metal Jacket', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1041_Item_MinionCandy*', + 'name' => 'Minion Candy', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1080_Item_MinionsFoot*', + 'name' => 'Minion\'s Foot', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1095_Item_NullwaveGauntlet*', + 'name' => 'Nullwave Gauntlet', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1015_Item_Oakheart*', + 'name' => 'Oakheart', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1070_Item_PiercingShard*', + 'name' => 'Piercing Shard', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1066_Item_PiercingSpear*', + 'name' => 'Piercing Spear', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1092_Item_PoisonedShiv*', + 'name' => 'Poisoned Shiv', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1084_Item_ProtectorContract*', + 'name' => 'Protector Contract', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1043_Item_ReflexBlock*', + 'name' => 'Reflex Block', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1054_Item_ScoutTrap*', + 'name' => 'Scout Trap', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1034_Item_SerpentMask*', + 'name' => 'Serpent Mask', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1013_Item_Shatterglass*', + 'name' => 'Shatterglass', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1042_Item_Shiversteel*', + 'name' => 'Shiversteel', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1005_Item_SixSins*', + 'name' => 'Six Sins', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1105_Item_SlumberingHusk*', + 'name' => 'Slumbering Husk', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1012_Item_Sorrowblade*', + 'name' => 'Sorrowblade', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1030_Item_SprintBoots*', + 'name' => 'Sprint Boots', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1090_Item_Stormcrown*', + 'name' => 'Stormcrown', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1074_Item_StormguardBanner*', + 'name' => 'Stormguard Banner', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1004_Item_SwiftShooter*', + 'name' => 'Swift Shooter', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1035_Item_TensionBow*', + 'name' => 'Tension Bow', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1014_Item_TornadoTrigger*', + 'name' => 'Tornado Trigger', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1032_Item_TravelBoots*', + 'name' => 'Travel Boots', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1049_Item_TyrantsMonocle*', + 'name' => 'Tyrant\'s Monocle' , + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1027_Item_VoidBattery*', + 'name' => 'Void Battery', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1056_Item_WarTreads*', + 'name' => 'War Treads', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1002_Item_WeaponBlade*', + 'name' => 'Weapon Blade', + 'is_activable' => false + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1052_Item_WeaponInfusion*', + 'name' => 'Weapon Infusion', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1002_Item_CandyShop_Kissy*', + 'name' => 'Kissy', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1005_Item_CandyShop_Taunt*', + 'name' => 'Taunt', + 'is_activable' => true + ]); + + DB::table('item')->insert([ + 'series' => '0', + 'api_id' => '*1007_Item_CandyShop_VOTaunt*', + 'name' => 'Voice over Taunt', + 'is_activable' => true + ]); + + } +} diff --git a/seeds/KeysTableSeeder.php b/seeds/KeysTableSeeder.php new file mode 100644 index 0000000..feec53d --- /dev/null +++ b/seeds/KeysTableSeeder.php @@ -0,0 +1,27 @@ +<?php + +use Illuminate\Database\Seeder; + +class KeysTableSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // Configs + DB::table('keys')->insert([ + 'type' => 'config', + 'key' => 'page_size', + 'value' => '10' + ]); + + DB::table('keys')->insert([ + 'type' => 'config', + 'key' => 'hp_fans', + 'value' => '3' + ]); + } +} diff --git a/seeds/RegionSeeder.php b/seeds/RegionSeeder.php new file mode 100644 index 0000000..e3b8f61 --- /dev/null +++ b/seeds/RegionSeeder.php @@ -0,0 +1,46 @@ +<?php + +use Illuminate\Database\Seeder; + +class RegionSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('region')->insert([ + 'id' => 1, + 'name' => 'all', + ]); + + DB::table('region')->insert([ + 'id' => 2, + 'name' => 'sg', + ]); + + DB::table('region')->insert([ + 'id' => 3, + 'name' => 'na', + ]); + DB::table('region')->insert([ + 'id' => 4, + 'name' => 'ea', + ]); + DB::table('region')->insert([ + 'id' => 5, + 'name' => 'sa', + ]); + DB::table('region')->insert([ + 'id' => 6, + 'name' => 'chn', + ]); + DB::table('region')->insert([ + 'id' => 7, + 'name' => 'eu', + ]); + } +} diff --git a/seeds/RoleSeeder.php b/seeds/RoleSeeder.php new file mode 100644 index 0000000..41706ad --- /dev/null +++ b/seeds/RoleSeeder.php @@ -0,0 +1,34 @@ +<?php + +use Illuminate\Database\Seeder; + +class RoleSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('role')->insert([ + 'id' => 1, + 'name' => 'all', + ]); + + DB::table('role')->insert([ + 'id' => 2, + 'name' => 'carry', + ]); + + DB::table('role')->insert([ + 'id' => 3, + 'name' => 'jungler', + ]); + DB::table('role')->insert([ + 'id' => 4, + 'name' => 'captain', + ]); + } +} diff --git a/seeds/SeriesSeeder.php b/seeds/SeriesSeeder.php new file mode 100644 index 0000000..63cd691 --- /dev/null +++ b/seeds/SeriesSeeder.php @@ -0,0 +1,130 @@ +<?php + +use Illuminate\Database\Seeder; +use Carbon\Carbon; + +class SeriesSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('series')->insert([ + 'name' => 'all', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.2', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2017, 3, 27), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.3', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 3, 28), + 'end' => Carbon::createFromDate(2017, 4, 26), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'all', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2020, 1, 1), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.2', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 1, 1), + 'end'=> Carbon::createFromDate(2017, 3, 27), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.3', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 3, 28), + 'end' => Carbon::createFromDate(2017, 4, 26), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.4', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 4, 26), + 'end' => Carbon::createFromDate(2017, 5, 31), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.4', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 4, 26), + 'end' => Carbon::createFromDate(2017, 5, 31), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.5', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 5, 31), + 'end' => Carbon::createFromDate(2017, 6, 21), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.5', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 5, 31), + 'end' => Carbon::createFromDate(2017, 6, 21), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.6', + 'dimension_on' => 'player', + 'start'=> Carbon::createFromDate(2017, 6, 21), + 'end' => Carbon::createFromDate(2017, 8, 8), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.6', + 'dimension_on' => 'global', + 'start'=> Carbon::createFromDate(2017, 6, 21), + 'end' => Carbon::createFromDate(2017, 8, 8), + 'show_in_web' => true + ]); + + + DB::table('series')->insert([ + 'name' => 'Patch 2.7', + 'dimension_on' => 'player', + 'start'=> Carbon::now(), + 'end' => Carbon::createFromDate(2020, 6, 21), + 'show_in_web' => true + ]); + + DB::table('series')->insert([ + 'name' => 'Patch 2.7', + 'dimension_on' => 'global', + 'start'=> Carbon::now(), + 'end' => Carbon::createFromDate(2020, 6, 21), + 'show_in_web' => true + ]); + + } +} diff --git a/seeds/SkilltierSeeder.php b/seeds/SkilltierSeeder.php new file mode 100644 index 0000000..2f68a11 --- /dev/null +++ b/seeds/SkilltierSeeder.php @@ -0,0 +1,87 @@ +<?php + +use Illuminate\Database\Seeder; + +class SkilltierSeeder extends Seeder +{ + /** + * Run the database seeds. + * + * @return void + */ + public function run() + { + // + DB::table('skill_tier')->insert([ + 'name' => 'all', + 'start'=> -1, + 'end'=> 30, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Unranked', + 'start'=> -1, + 'end'=> -1, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Just Beginning', + 'start'=> 0, + 'end'=> 2, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Getting There', + 'start'=> 3, + 'end'=> 5, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Rock Solid', + 'start'=> 6, + 'end'=> 8, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Worthy Foe', + 'start'=> 9, + 'end'=> 11, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Got Swagger', + 'start'=> 12, + 'end'=> 14, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Credible Threat', + 'start'=> 15, + 'end'=> 17, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'The Hotness', + 'start'=> 18, + 'end'=> 20, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Simply Amazing', + 'start'=> 21, + 'end'=> 23, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Pinnacle Of Awesome', + 'start'=> 24, + 'end'=> 26, + ]); + + DB::table('skill_tier')->insert([ + 'name' => 'Vainglorious', + 'start'=> 27, + 'end'=> 29, + ]); + } +} |
