Kode dari ftuntan_main dengan dependensi diperbarui untuk PHP 8.3 (perbaikan insiden 27 Okt 2026). Dump database di database/sql/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
1.9 KiB
PHP
56 lines
1.9 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreatePertanyaansTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('pertanyaans', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->text('nama')->nullable(false);
|
|
$table->text('email')->nullable(false);
|
|
$table->text('pertanyaan')->nullable(false);
|
|
$table->softDeletes();
|
|
$table->timestamps();
|
|
});
|
|
|
|
DB::table('pertanyaans')->insert(
|
|
array(
|
|
[
|
|
'nama' => "Muhammad Faris Ruswandi",
|
|
'email' => "faris@gmail.com",
|
|
'pertanyaan' => "Pertanyaan 1 : Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur",
|
|
],
|
|
[
|
|
'nama' => "Ferdi Nanda Pratama",
|
|
'email' => "ferdi@gmail.com",
|
|
'pertanyaan' => "Pertanyaan 2 : Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur",
|
|
],
|
|
[
|
|
'nama' => "Rachman Dwi Putra",
|
|
'email' => "rachman@gmail.com",
|
|
'pertanyaan' => "Pertanyaan 3 : Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur",
|
|
]
|
|
)
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('pertanyaans');
|
|
}
|
|
}
|