apa
This commit is contained in:
parent
cf98df8eba
commit
b48a492a94
|
@ -17,7 +17,6 @@ return new class extends Migration
|
|||
$table->string('username')->unique(); // Ganti email jadi username
|
||||
$table->string('email', 255)->unique();
|
||||
$table->string('password');
|
||||
$table->string('role');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
};
|
|
@ -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'
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
|||
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
|
@ -14,9 +15,11 @@ class DatabaseSeeder extends Seeder
|
|||
{
|
||||
// \App\Models\User::factory(10)->create();
|
||||
|
||||
// \App\Models\User::factory()->create([
|
||||
// 'name' => 'Test User',
|
||||
// 'email' => 'test@example.com',
|
||||
// ]);
|
||||
\App\Models\User::create([
|
||||
'name' => 'Admin User',
|
||||
'username' => 'ysn',
|
||||
'email' => 'yasindaputri16@gmail.com',
|
||||
'password' => Hash::make('1234567890'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue