Add datastore_id to OS model and related functionality; update validation and relationships
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('os', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('datastore_id')->nullable()->after('module_host_id');
|
||||
$table->foreign('datastore_id')
|
||||
->references('id')
|
||||
->on('module_datastore')
|
||||
->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('os', function (Blueprint $table) {
|
||||
$table->dropForeign(['datastore_id']);
|
||||
$table->dropColumn('datastore_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -23,7 +23,6 @@ class DatabaseSeeder extends Seeder
|
||||
$user->assignRole('Full Administrator');
|
||||
$this->call(TemplateSeeder::class);
|
||||
$this->call(Setting::class);
|
||||
// $this->call(ControlPanelSeeder::class);
|
||||
// $this->call(VPSProductSeeder::class);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user