This commit is contained in:
Dwi Swandhana
2026-07-22 05:18:55 +07:00
parent 6d0f9a8bf6
commit 32db765b98
50 changed files with 2189 additions and 1909 deletions
@@ -0,0 +1,72 @@
<?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
{
if (!Schema::hasTable('poli')) {
Schema::create('poli', function (Blueprint $table) {
$table->id();
$table->string('poli', 250)->nullable();
$table->string('subpoli', 250)->nullable();
$table->string('subsubpoli', 250)->nullable();
$table->string('modaliti', 150)->nullable();
$table->string('kelompok', 150)->nullable();
$table->string('modaliti2', 150)->nullable();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
});
return;
}
Schema::table('poli', function (Blueprint $table) {
if (!Schema::hasColumn('poli', 'poli')) {
$table->string('poli', 250)->nullable();
}
if (!Schema::hasColumn('poli', 'subpoli')) {
$table->string('subpoli', 250)->nullable();
}
if (!Schema::hasColumn('poli', 'subsubpoli')) {
$table->string('subsubpoli', 250)->nullable();
}
if (!Schema::hasColumn('poli', 'modaliti')) {
$table->string('modaliti', 150)->nullable();
}
if (!Schema::hasColumn('poli', 'kelompok')) {
$table->string('kelompok', 150)->nullable();
}
if (!Schema::hasColumn('poli', 'modaliti2')) {
$table->string('modaliti2', 150)->nullable();
}
if (!Schema::hasColumn('poli', 'created_at')) {
$table->timestamp('created_at')->nullable();
}
if (!Schema::hasColumn('poli', 'updated_at')) {
$table->timestamp('updated_at')->nullable();
}
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Kolom poli dipakai data production, rollback tidak menghapus kolom.
}
};
File diff suppressed because it is too large Load Diff