You've already forked Atomcms-edit
Modernize: remove unused deps, replace qirolab/laravel-themer with custom ThemeService, drop doctrine/dbal
- Remove whichbrowser/parser, mockery/mockery, fruitcake/laravel-debugbar,
itsgoingd/clockwork (all unused)
- Replace qirolab/laravel-themer (dev-master) with custom App\Services\ThemeService
and App\Providers\ThemeServiceProvider
- Drop doctrine/dbal: rewrite all ->change() calls in 8 migrations to raw
DB::statement('ALTER TABLE ... MODIFY ...') SQL
- RenameColumn() kept intact (works without dbal in Laravel 13)
- Fix 2026_04_04 migration: inverted column-exists logic corrected
- Clear bootstrap cache to remove stale references to removed packages
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
DB::statement('ALTER TABLE website_articles MODIFY user_id INT NULL');
|
||||
Schema::table('website_articles', function (Blueprint $table) {
|
||||
$table->integer('user_id')->nullable()->change();
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
@@ -18,7 +18,7 @@ return new class extends Migration
|
||||
{
|
||||
Schema::table('website_articles', function (Blueprint $table) {
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->string('user_id')->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE website_articles MODIFY user_id VARCHAR(255) NOT NULL');
|
||||
}
|
||||
};
|
||||
|
||||
+1
-3
@@ -15,9 +15,7 @@ return new class extends Migration
|
||||
$table->renameColumn('features', 'content');
|
||||
});
|
||||
|
||||
Schema::table('website_shop_article_features', function (Blueprint $table) {
|
||||
$table->string('content')->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE website_shop_article_features MODIFY content VARCHAR(255) NOT NULL');
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->timestamp('created_at')->useCurrent()->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE password_reset_tokens MODIFY created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
|
||||
+3
-7
@@ -1,22 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('website_settings', function (Blueprint $table) {
|
||||
$table->text('value')->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE website_settings MODIFY value TEXT NOT NULL');
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('website_settings', function (Blueprint $table) {
|
||||
$table->string('value')->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE website_settings MODIFY value VARCHAR(255) NOT NULL');
|
||||
}
|
||||
};
|
||||
|
||||
+3
-7
@@ -1,22 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateSubjectIdColumnInActivityLogTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('activity_log', function (Blueprint $table) {
|
||||
$table->string('subject_id')->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE activity_log MODIFY subject_id VARCHAR(255) NOT NULL');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('activity_log', function (Blueprint $table) {
|
||||
$table->integer('subject_id')->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE activity_log MODIFY subject_id INT NOT NULL');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,7 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('game_rooms', function (Blueprint $table) {
|
||||
if (! Schema::hasColumn('game_rooms', 'status')) {
|
||||
$table->string('status')->index()->change();
|
||||
} else {
|
||||
$table->index('status', 'idx_game_rooms_status');
|
||||
}
|
||||
$table->index('status', 'idx_game_rooms_status');
|
||||
$table->index('game', 'idx_game_rooms_game');
|
||||
});
|
||||
|
||||
|
||||
+3
-7
@@ -3,22 +3,18 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('password', 255)->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE users MODIFY password VARCHAR(255) NOT NULL');
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('password', 60)->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE users MODIFY password VARCHAR(60) NOT NULL');
|
||||
}
|
||||
};
|
||||
|
||||
+1
-4
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
@@ -14,9 +13,7 @@ return new class extends Migration
|
||||
->orWhere('last_username_change', 0)
|
||||
->update(['last_username_change' => 0]);
|
||||
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->integer('last_username_change')->default(0)->change();
|
||||
});
|
||||
DB::statement('ALTER TABLE users MODIFY last_username_change INT DEFAULT 0 NOT NULL');
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
|
||||
Reference in New Issue
Block a user