mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Update used packages to their latest versions
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
use Aimeos\Nestedset\NestedSet;
|
||||
|
||||
use TeamTeaTime\Forum\Models\Category;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('forum_categories', function (Blueprint $table) {
|
||||
NestedSet::columnsDepth($table);
|
||||
});
|
||||
|
||||
Category::fixTree();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('forum_categories', function (Blueprint $table) {
|
||||
NestedSet::dropColumnsDepth($table);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
use Aimeos\Nestedset\NestedSet;
|
||||
|
||||
use TeamTeaTime\Forum\Models\Category;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (Schema::hasColumn('forum_categories', 'depth')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::table('forum_categories', function (Blueprint $table) {
|
||||
NestedSet::columnsDepth($table);
|
||||
});
|
||||
|
||||
Category::fixTree();
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('forum_categories', function (Blueprint $table) {
|
||||
NestedSet::dropColumnsDepth($table);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user