This commit is contained in:
Dwi Swandhana
2026-05-21 06:37:14 +07:00
parent acac1fe3c8
commit 3e9e8daea6
6 changed files with 116 additions and 121 deletions
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('bio_specimens', function (Blueprint $table) {
if (!Schema::hasColumn('bio_specimens', 'atcc')) {
$table->string('atcc', 150)->nullable()->after('strain');
}
if (!Schema::hasColumn('bio_specimens', 'sampleid')) {
$table->string('sampleid', 150)->nullable()->after('atcc');
}
});
}
public function down(): void
{
Schema::table('bio_specimens', function (Blueprint $table) {
if (Schema::hasColumn('bio_specimens', 'atcc')) {
$table->dropColumn('atcc');
}
if (Schema::hasColumn('bio_specimens', 'sampleid')) {
$table->dropColumn('sampleid');
}
});
}
};