This commit is contained in:
gitaysn 2025-05-24 16:57:49 +07:00
parent cf98df8eba
commit b48a492a94
4 changed files with 7 additions and 70 deletions

View File

@ -17,7 +17,6 @@ return new class extends Migration
$table->string('username')->unique(); // Ganti email jadi username $table->string('username')->unique(); // Ganti email jadi username
$table->string('email', 255)->unique(); $table->string('email', 255)->unique();
$table->string('password'); $table->string('password');
$table->string('role');
$table->rememberToken(); $table->rememberToken();
$table->timestamps(); $table->timestamps();
}); });

View File

@ -1,29 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('nilai_alternatif', function (Blueprint $table) {
$table->id();
$table->foreignId('alternatif_id')->constrained('dataalternatif')->onDelete('cascade');
$table->json('nilai')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('nilai_alternatif');
}
};

View File

@ -1,36 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('penilaian', function (Blueprint $table) {
$table->float('nilai_c1')->nullable();
$table->float('nilai_c2')->nullable();
$table->float('nilai_c3')->nullable();
$table->float('nilai_c4')->nullable();
$table->float('nilai_c5')->nullable();
$table->float('nilai_c6')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('penilaian', function (Blueprint $table) {
$table->dropColumn([
'nilai_c1', 'nilai_c2', 'nilai_c3',
'nilai_c4', 'nilai_c5', 'nilai_c6'
]);
});
}
};

View File

@ -4,6 +4,7 @@ namespace Database\Seeders;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents; // use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
{ {
@ -14,9 +15,11 @@ class DatabaseSeeder extends Seeder
{ {
// \App\Models\User::factory(10)->create(); // \App\Models\User::factory(10)->create();
// \App\Models\User::factory()->create([ \App\Models\User::create([
// 'name' => 'Test User', 'name' => 'Admin User',
// 'email' => 'test@example.com', 'username' => 'ysn',
// ]); 'email' => 'yasindaputri16@gmail.com',
'password' => Hash::make('1234567890'),
]);
} }
} }