Files
mylesen/database/migrations/2025_12_17_164738_alter_penempatans_table.php

37 lines
909 B
PHP

<?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('penempatans', function (Blueprint $table) {
$table->after('nama', function (Blueprint $table) {
$table->integer('kawasan_id');
$table->integer('taman_id')->nullable();
$table->integer('jalan_id')->nullable();
});
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('penempatans', function (Blueprint $table) {
$table->dropColumn('kawasan_id');
$table->dropColumn('taman_id');
$table->dropColumn('jalan_id');
});
}
};