Feature #4 : Villages

This commit is contained in:
Daeng Deni Mardaeni
2024-08-10 20:12:04 +07:00
parent f1a1f23b12
commit d73a006ce0
15 changed files with 84312 additions and 7 deletions

View File

@@ -0,0 +1,38 @@
<?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('villages', function (Blueprint $table) {
$table->id();
$table->string('province_code')->index();
$table->string('city_code')->index();
$table->string('district_code')->index();
$table->string('code');
$table->string('name');
$table->string('alt_name')->nullable();
$table->string('postal_code', 5)->nullable();
$table->timestamps();
$table->softDeletes();
$table->uuid('created_by')->nullable();
$table->uuid('updated_by')->nullable();
$table->uuid('deleted_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('villages');
}
};