1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 15:33:44 +01:00

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) { 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) { 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');
});
}
};