2021_09_20_145708_create_kelurahans_table.php
759 Bytes
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateKelurahansTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kelurahans', function (Blueprint $table) {
$table->id();
$table->foreignId('kecamatan_id')->nullable()->constrained();
$table->string('nama')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('kelurahans');
}
}