feat(Basicdata): Update 'is_dalam_kota' column and add new branches
- Update 'is_dalam_kota' to true for existing branches based on suffix code - Set 'is_dalam_kota' to false for branches not in the list - Add new branches (ID0012005 - KORPORASI, ID0010172 - AMBON TUAL MALUKU) - Seeder is idempotent and can be rerun safely run this command: php artisan module:seed Basicdata --class="UpdateBranchesIsDalamKotaSeeder" php artisan module:seed --class="Modules\\Basicdata\\Database\\Seeders\\UpdateBranchesIsDalamKotaSeeder"
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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('branches', function (Blueprint $table) {
|
||||
$table->boolean('is_dalam_kota')->default(true)->after('name');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('branches', function (Blueprint $table) {
|
||||
$table->dropColumn('is_dalam_kota');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user