Fixed changes onto previous migration for YABs F key

Fixed changes onto previous migration for YABs F key
This commit is contained in:
cp6 2022-06-24 12:41:30 +10:00
parent 6e1f4bb4ea
commit 7daf609b91
2 changed files with 18 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class AddForeignKeys extends Migration
});
Schema::table('yabs', function (Blueprint $table) {
$table->foreign('server_id', 'yabs_fk_servers')->references('id')->on('servers')->onDelete('cascade');
$table->foreign('server_id', 'yabs_fk_servers')->references('id')->on('servers');
});
Schema::table('disk_speed', function (Blueprint $table) {

View File

@ -0,0 +1,17 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table('yabs', function (Blueprint $table) {
$table->dropForeign('yabs_fk_servers');
$table->foreign('server_id', 'yabs_fk_servers')->references('id')->on('servers')->onDelete('cascade');
});
}
};