1
0
forked from poc/pds

Added migration and Updated model, resource, importer, exporter to add test_sequence_flag, test_started_at columns and Refactored validations and design in resource page for testing_panel_readings table and Added these columns to Motor Testing Panel Post API in TestingPanelController

This commit is contained in:
dhanabalan
2026-10-07 09:15:36 +05:30
parent 5f472cf0d4
commit f2a249bf35
6 changed files with 197 additions and 8 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
{
$sql1 = <<<'SQL'
ALTER TABLE testing_panel_readings
ADD COLUMN test_sequence_flag TEXT DEFAULT '4'
SQL;
DB::statement($sql1);
$sql2 = <<<'SQL'
ALTER TABLE testing_panel_readings
ADD COLUMN test_started_at TIMESTAMP DEFAULT NULL
SQL;
DB::statement($sql2);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Schema::table('testing_panel_readings', function (Blueprint $table) {
// //
// });
}
};