mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
Moves tables indexes into initial table migrations
We can do this kind of crap until launch
This commit is contained in:
parent
54255b46e9
commit
27361b6128
@ -27,6 +27,8 @@ return new class extends Migration
|
||||
$table->boolean('disabled')->default(false);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['deleted_at', 'disabled'], 'mods_show_index');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,8 @@ return new class extends Migration
|
||||
$table->string('color_class');
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['version', 'deleted_at'], 'spt_versions_filtering_index');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,8 @@ return new class extends Migration
|
||||
$table->boolean('disabled')->default(false);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['mod_id', 'deleted_at', 'disabled', 'version'], 'mod_versions_filtering_index');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('mods', function (Blueprint $table) {
|
||||
$table->index(['deleted_at', 'disabled'], 'mods_show_index');
|
||||
});
|
||||
|
||||
Schema::table('mod_versions', function (Blueprint $table) {
|
||||
$table->index(['mod_id', 'deleted_at', 'disabled', 'version'], 'mod_versions_filtering_index');
|
||||
});
|
||||
|
||||
Schema::table('spt_versions', function (Blueprint $table) {
|
||||
$table->index(['version', 'deleted_at'], 'spt_versions_filtering_index');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('mods', function (Blueprint $table) {
|
||||
$table->dropIndex('mods_show_index');
|
||||
$table->dropIndex('mod_versions_filtering_index');
|
||||
$table->dropIndex('spt_versions_filtering_index');
|
||||
});
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user