Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operation eliminate SFJ #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 0 additions & 108 deletions cncnet-api/database/migrations/2022_06_11_174646_createSFJLadder.php

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class DeleteSFJLadder extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$sfjLadder = \App\Ladder::where('abbreviation', 'sfj')->first();
Copy link
Collaborator Author

@alexp8 alexp8 Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I simply delete the SFJ ladder model, will it cascade down and delete all linked data for me? Wondering if I need a migration file this long to delete the SFJ data

@GrantBartlett


\App\QmMap::where('ladder_id', $sfjLadder->id)->delete();
\App\Map::where('ladder_id', $sfjLadder->id)->delete();
\App\Player::where('ladder_id', $sfjLadder->id)->delete();

$ladderHistories = \App\LadderHistory::where('ladder_id', $sfjLadder->id)->get();

foreach ($ladderHistories as $ladderHistory)
{
$games = \App\Game::where('ladder_history_id', $ladderHistory->id)->get();
foreach ($games as $game)
{
$playerGames = \App\PlayerGameReport::where('game_id', $game->id)->get();

foreach($playerGames as $playerGame)
{
\App\Stats2::where('player_game_report_id', $playerGame->id)->delete();
}
\App\PlayerGameReport::where('game_id', $game->id)->delete();
\App\GameReport::where('game_id', $game->id)->delete();
}
\App\Game::where('ladder_history_id', $ladderHistory->id)->delete();

\App\PlayerCache::where('ladder_history_id', $ladderHistory->id)->delete();
\App\PlayerHistory::where('ladder_history_id', $ladderHistory->id)->delete();
}
\App\LadderHistory::where('ladder_id', $sfjLadder->id)->delete();
\App\LadderAdmin::where('ladder_id', $sfjLadder->id)->delete();
\App\MapPool::where('ladder_id', $sfjLadder->id)->delete();
\App\Side::where('ladder_id', $sfjLadder->id)->delete();
\App\SpawnOptionValue::where('ladder_id', $sfjLadder->id)->delete();
\App\QmLadderRules::where('ladder_id', $sfjLadder->id)->delete();
\App\PlayerActiveHandle::where('ladder_id', $sfjLadder->id)->delete();

$sfjLadder->delete();
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
Binary file removed cncnet-api/public/images/cameos/sfj-cameo.png
Binary file not shown.
Binary file modified cncnet-api/public/images/games/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed cncnet-api/public/images/ladder/sfj-cover.png
Binary file not shown.
5 changes: 0 additions & 5 deletions cncnet-api/resources/sass/base/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,3 @@
{
background-position: calc(-25px * 10);
}

.icon-sfj:before
{
background-position: calc(-25px * 11);
}
136 changes: 0 additions & 136 deletions cncnet-api/resources/sass/components/_cameos.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@
height: 48px;
}

.sfj-cameo
{
background-image: url(../images/cameos/sfj-cameo.png);
background-repeat: no-repeat;
background-position: top left;
width: 60px;
height: 48px;
}

.blitz-cameo
{
background-image: url(../images/cameos/blitz-cameo.png);
Expand Down Expand Up @@ -560,133 +551,6 @@
.ra2-cameo.cameo-spypicon { background-position: -7320px 0; }
.ra2-cameo.cameo-psybicon { background-position: -7380px 0; }

// SFJ

.sfj-cameo.cameo-adogicon { background-position: 0 0; }
.sfj-cameo.cameo-agisicon { background-position: -60px 0; }
.sfj-cameo.cameo-ahrvicon { background-position: -120px 0; }
.sfj-cameo.cameo-asaticon { background-position: -180px 0; }
.sfj-cameo.cameo-ayaricon { background-position: -240px 0; }
.sfj-cameo.cameo-bfrticon { background-position: -300px 0; }
.sfj-cameo.cameo-bnkricon { background-position: -360px 0; }
.sfj-cameo.cameo-brckicon { background-position: -420px 0; }
.sfj-cameo.cameo-brisicon { background-position: -480px 0; }
.sfj-cameo.cameo-brrkicon { background-position: -540px 0; }
.sfj-cameo.cameo-bruticon { background-position: -600px 0; }
.sfj-cameo.cameo-bsubicon { background-position: -660px 0; }
.sfj-cameo.cameo-caosicon { background-position: -720px 0; }
.sfj-cameo.cameo-carricon { background-position: -780px 0; }
.sfj-cameo.cameo-ccomicon { background-position: -840px 0; }
.sfj-cameo.cameo-citwlicon { background-position: -900px 0; }
.sfj-cameo.cameo-clegicon { background-position: -960px 0; }
.sfj-cameo.cameo-clonicon { background-position: -1020px 0; }
.sfj-cameo.cameo-csphicon { background-position: -1080px 0; }
.sfj-cameo.cameo-desoicon { background-position: -1140px 0; }
.sfj-cameo.cameo-desticon { background-position: -1200px 0; }
.sfj-cameo.cameo-diskicon { background-position: -1260px 0; }
.sfj-cameo.cameo-dlphicon { background-position: -1320px 0; }
.sfj-cameo.cameo-dogicon { background-position: -1380px 0; }
.sfj-cameo.cameo-dredicon { background-position: -1440px 0; }
.sfj-cameo.cameo-dronicon { background-position: -1500px 0; }
.sfj-cameo.cameo-e2icon { background-position: -1560px 0; }
.sfj-cameo.cameo-engnicon { background-position: -1620px 0; }
.sfj-cameo.cameo-fixicon { background-position: -1680px 0; }
.sfj-cameo.cameo-flakicon { background-position: -1740px 0; }
.sfj-cameo.cameo-flkticon { background-position: -1800px 0; }
.sfj-cameo.cameo-fvicon { background-position: -1860px 0; }
.sfj-cameo.cameo-gapicon { background-position: -1920px 0; }
.sfj-cameo.cameo-gcanicon { background-position: -1980px 0; }
.sfj-cameo.cameo-gdgiicon { background-position: -2040px 0; }
.sfj-cameo.cameo-ggunicon { background-position: -2100px 0; }
.sfj-cameo.cameo-giicon { background-position: -2160px 0; }
.sfj-cameo.cameo-gorep { background-position: -2220px 0; }
.sfj-cameo.cameo-grndicon { background-position: -2280px 0; }
.sfj-cameo.cameo-gtncicon { background-position: -2340px 0; }
.sfj-cameo.cameo-gtnkicon { background-position: -2400px 0; }
.sfj-cameo.cameo-gwepicon { background-position: -2460px 0; }
.sfj-cameo.cameo-handicon { background-position: -2520px 0; }
.sfj-cameo.cameo-harvicon { background-position: -2580px 0; }
.sfj-cameo.cameo-heliicon { background-position: -2640px 0; }
.sfj-cameo.cameo-hovricon { background-position: -2700px 0; }
.sfj-cameo.cameo-htkicon { background-position: -2760px 0; }
.sfj-cameo.cameo-htnkicon { background-position: -2820px 0; }
.sfj-cameo.cameo-indpicon { background-position: -2880px 0; }
.sfj-cameo.cameo-initicon { background-position: -2940px 0; }
.sfj-cameo.cameo-ironicon { background-position: -3000px 0; }
.sfj-cameo.cameo-ivanicon { background-position: -3060px 0; }
.sfj-cameo.cameo-ivncicon { background-position: -3120px 0; }
.sfj-cameo.cameo-jjeticon { background-position: -3180px 0; }
.sfj-cameo.cameo-landicon { background-position: -3240px 0; }
.sfj-cameo.cameo-ltnkicon { background-position: -3300px 0; }
.sfj-cameo.cameo-lunricon { background-position: -3360px 0; }
.sfj-cameo.cameo-mcvicon { background-position: -3420px 0; }
.sfj-cameo.cameo-mindicon { background-position: -3480px 0; }
.sfj-cameo.cameo-msslicon { background-position: -3540px 0; }
.sfj-cameo.cameo-mtnkicon { background-position: -3600px 0; }
.sfj-cameo.cameo-npwricon { background-position: -3660px 0; }
.sfj-cameo.cameo-nradicon { background-position: -3720px 0; }
.sfj-cameo.cameo-nrcticon { background-position: -3780px 0; }
.sfj-cameo.cameo-nreficon { background-position: -3840px 0; }
.sfj-cameo.cameo-ntchicon { background-position: -3900px 0; }
.sfj-cameo.cameo-nwalicon { background-position: -3960px 0; }
.sfj-cameo.cameo-nwepicon { background-position: -4020px 0; }
.sfj-cameo.cameo-pillicon { background-position: -4080px 0; }
.sfj-cameo.cameo-plticon { background-position: -4140px 0; }
.sfj-cameo.cameo-powricon { background-position: -4200px 0; }
.sfj-cameo.cameo-prisicon { background-position: -4260px 0; }
.sfj-cameo.cameo-psicicon { background-position: -4320px 0; }
.sfj-cameo.cameo-psisicon { background-position: -4380px 0; }
.sfj-cameo.cameo-psyticon { background-position: -4440px 0; }
.sfj-cameo.cameo-pupticon { background-position: -4500px 0; }
.sfj-cameo.cameo-rbccicon { background-position: -4560px 0; }
.sfj-cameo.cameo-reficon { background-position: -4620px 0; }
.sfj-cameo.cameo-rfixicon { background-position: -4680px 0; }
.sfj-cameo.cameo-roboicon { background-position: -4740px 0; }
.sfj-cameo.cameo-rtnkicon { background-position: -4800px 0; }
.sfj-cameo.cameo-samicon { background-position: -4860px 0; }
.sfj-cameo.cameo-sapcicon { background-position: -4920px 0; }
.sfj-cameo.cameo-schpicon { background-position: -4980px 0; }
.sfj-cameo.cameo-sealicon { background-position: -5040px 0; }
.sfj-cameo.cameo-shadicon { background-position: -5100px 0; }
.sfj-cameo.cameo-shkicon { background-position: -5160px 0; }
.sfj-cameo.cameo-smcvicon { background-position: -5220px 0; }
.sfj-cameo.cameo-sminicon { background-position: -5280px 0; }
.sfj-cameo.cameo-snipicon { background-position: -5340px 0; }
.sfj-cameo.cameo-spyicon { background-position: -5400px 0; }
.sfj-cameo.cameo-sqdicon { background-position: -5460px 0; }
.sfj-cameo.cameo-sreficon { background-position: -5520px 0; }
.sfj-cameo.cameo-subicon { background-position: -5580px 0; }
.sfj-cameo.cameo-tanyicon { background-position: -5640px 0; }
.sfj-cameo.cameo-tbnkicon { background-position: -5700px 0; }
.sfj-cameo.cameo-techicon { background-position: -5760px 0; }
.sfj-cameo.cameo-teleicon { background-position: -5820px 0; }
.sfj-cameo.cameo-tnkdicon { background-position: -5880px 0; }
.sfj-cameo.cameo-dtruckicon { background-position: -5940px 0; }
.sfj-cameo.cameo-trsticon { background-position: -6000px 0; }
.sfj-cameo.cameo-tslaicon { background-position: -6060px 0; }
.sfj-cameo.cameo-ttnkicon { background-position: -6120px 0; }
.sfj-cameo.cameo-v3icon { background-position: -6180px 0; }
.sfj-cameo.cameo-vrusicon { background-position: -6240px 0; }
.sfj-cameo.cameo-wallicon { background-position: -6300px 0; }
.sfj-cameo.cameo-wethicon { background-position: -6360px 0; }
.sfj-cameo.cameo-yardicon { background-position: -6420px 0; }
.sfj-cameo.cameo-yclnicon { background-position: -6480px 0; }
.sfj-cameo.cameo-yengicon { background-position: -6540px 0; }
.sfj-cameo.cameo-yhvricon { background-position: -6600px 0; }
.sfj-cameo.cameo-ypvicon { background-position: -6660px 0; }
.sfj-cameo.cameo-ypwricon { background-position: -6720px 0; }
.sfj-cameo.cameo-ytchicon { background-position: -6780px 0; }
.sfj-cameo.cameo-ytnkicon { background-position: -6840px 0; }
.sfj-cameo.cameo-yurpicon { background-position: -6900px 0; }
.sfj-cameo.cameo-ywepicon { background-position: -6960px 0; }
.sfj-cameo.cameo-yyrdicon { background-position: -7020px 0; }
.sfj-cameo.cameo-zepicon { background-position: -7080px 0; }
.sfj-cameo.cameo-beagicon { background-position: -7140px 0; }
.sfj-cameo.cameo-bplnicon { background-position: -7200px 0; }
.sfj-cameo.cameo-falcicon { background-position: -7260px 0; }
.sfj-cameo.cameo-spypicon { background-position: -7320px 0; }
.sfj-cameo.cameo-psybicon { background-position: -7380px 0; }

// Blitz

.blitz-cameo.cameo-adogicon { background-position: 0 0; }
Expand Down
2 changes: 1 addition & 1 deletion cncnet-api/resources/views/donate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<li>
<p>
Developed ladder enhancements such as: reduce map repeats, remove point filter, creation of
RA2/Blitz/SFJ ladders, and general ladder maintenance.
RA2/Blitz ladders, and general ladder maintenance.
</p>
</li>
</ul>
Expand Down