Added migration, model, resource, importer, and exporter files for add stop_flow_id columns and remove stopped columns
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
This commit is contained in:
@@ -311,13 +311,13 @@ class ClassCharacteristicExporter extends Exporter
|
|||||||
->label('ZMM OPERATING TEMPERATURE'),
|
->label('ZMM OPERATING TEMPERATURE'),
|
||||||
ExportColumn::make('zmm_axial_force')
|
ExportColumn::make('zmm_axial_force')
|
||||||
->label('ZMM AXIAL FORCE'),
|
->label('ZMM AXIAL FORCE'),
|
||||||
ExportColumn::make('is_stopped')
|
// ExportColumn::make('is_stopped')
|
||||||
->label('IS STOPPED')
|
// ->label('IS STOPPED')
|
||||||
->formatStateUsing(fn ($state) => ($state == '0') ? 'No' : ($state == '1' ? 'Yes' : 'Yes (Alert Pending)')),
|
// ->formatStateUsing(fn ($state) => ($state == '0') ? 'No' : ($state == '1' ? 'Yes' : 'Yes (Alert Pending)')),
|
||||||
ExportColumn::make('stopped_datetime')
|
// ExportColumn::make('stopped_datetime')
|
||||||
->label('STOPPED DATETIME'),
|
// ->label('STOPPED DATETIME'),
|
||||||
ExportColumn::make('stopped_by')
|
// ExportColumn::make('stopped_by')
|
||||||
->label('STOPPED BY'),
|
// ->label('STOPPED BY'),
|
||||||
ExportColumn::make('mark_status')
|
ExportColumn::make('mark_status')
|
||||||
->label('MARKED STATUS'),
|
->label('MARKED STATUS'),
|
||||||
ExportColumn::make('marked_physical_count')
|
ExportColumn::make('marked_physical_count')
|
||||||
@@ -363,7 +363,14 @@ class ClassCharacteristicExporter extends Exporter
|
|||||||
ExportColumn::make('name_plate_marked_by')
|
ExportColumn::make('name_plate_marked_by')
|
||||||
->label('NAME PLATE MARKED BY'),
|
->label('NAME PLATE MARKED BY'),
|
||||||
ExportColumn::make('motor_pump_pumpset_status')
|
ExportColumn::make('motor_pump_pumpset_status')
|
||||||
->label('MOTOR PUMP PUMPSET STATUS'),
|
->label('MOTOR PUMP PUMPSET STATUS')
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'1' => 'Motor',
|
||||||
|
'2' => 'Pump',
|
||||||
|
'3' => 'PumpSet',
|
||||||
|
'4' => 'Name Plate',
|
||||||
|
default => 'NIL',
|
||||||
|
}),
|
||||||
ExportColumn::make('winded_serial_number')
|
ExportColumn::make('winded_serial_number')
|
||||||
->label('WINDED SERIAL NUMBER'),
|
->label('WINDED SERIAL NUMBER'),
|
||||||
ExportColumn::make('winded_rework_status')
|
ExportColumn::make('winded_rework_status')
|
||||||
@@ -386,6 +393,36 @@ class ClassCharacteristicExporter extends Exporter
|
|||||||
->label('PENDING RELEASED STATUS'),
|
->label('PENDING RELEASED STATUS'),
|
||||||
ExportColumn::make('has_work_flow_id')
|
ExportColumn::make('has_work_flow_id')
|
||||||
->label('HAS WORK FLOW ID'),
|
->label('HAS WORK FLOW ID'),
|
||||||
|
ExportColumn::make('motor_stop_flow_id')
|
||||||
|
->label('MOTOR STOP FLOW ID')
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
default => '-',
|
||||||
|
}),
|
||||||
|
ExportColumn::make('pump_stop_flow_id')
|
||||||
|
->label('PUMP STOP FLOW ID')
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
default => '-',
|
||||||
|
}),
|
||||||
|
ExportColumn::make('name_plate_stop_flow_id')
|
||||||
|
->label('NAME PLATE STOP FLOW ID')
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
default => '-',
|
||||||
|
}),
|
||||||
ExportColumn::make('created_at')
|
ExportColumn::make('created_at')
|
||||||
->label('CREATED AT'),
|
->label('CREATED AT'),
|
||||||
ExportColumn::make('created_by')
|
ExportColumn::make('created_by')
|
||||||
|
|||||||
@@ -583,18 +583,6 @@ class ClassCharacteristicImporter extends Importer
|
|||||||
->label('ZMM AXIAL FORCE')
|
->label('ZMM AXIAL FORCE')
|
||||||
->exampleHeader('ZMM AXIAL FORCE')
|
->exampleHeader('ZMM AXIAL FORCE')
|
||||||
->example(''),
|
->example(''),
|
||||||
ImportColumn::make('is_stopped')
|
|
||||||
->label('IS STOPPED')
|
|
||||||
->exampleHeader('IS STOPPED')
|
|
||||||
->example('0'),
|
|
||||||
ImportColumn::make('stopped_datetime')
|
|
||||||
->label('STOPPED DATETIME')
|
|
||||||
->exampleHeader('STOPPED DATETIME')
|
|
||||||
->example('01-01-2026 00:08:00'),
|
|
||||||
ImportColumn::make('stopped_by')
|
|
||||||
->label('STOPPED BY')
|
|
||||||
->exampleHeader('STOPPED BY')
|
|
||||||
->example(''),
|
|
||||||
ImportColumn::make('mark_status')
|
ImportColumn::make('mark_status')
|
||||||
->label('MARKED STATUS')
|
->label('MARKED STATUS')
|
||||||
->exampleHeader('MARKED STATUS')
|
->exampleHeader('MARKED STATUS')
|
||||||
@@ -731,6 +719,18 @@ class ClassCharacteristicImporter extends Importer
|
|||||||
->label('HAS WORK FLOW ID')
|
->label('HAS WORK FLOW ID')
|
||||||
->exampleHeader('HAS WORK FLOW ID')
|
->exampleHeader('HAS WORK FLOW ID')
|
||||||
->example('0'),
|
->example('0'),
|
||||||
|
ImportColumn::make('motor_stop_flow_id')
|
||||||
|
->label('MOTOR STOP FLOW ID')
|
||||||
|
->exampleHeader('MOTOR STOP FLOW ID')
|
||||||
|
->example('5'),
|
||||||
|
ImportColumn::make('pump_stop_flow_id')
|
||||||
|
->label('PUMP STOP FLOW ID')
|
||||||
|
->exampleHeader('PUMP STOP FLOW ID')
|
||||||
|
->example('5'),
|
||||||
|
ImportColumn::make('name_plate_stop_flow_id')
|
||||||
|
->label('NAME PLATE STOP FLOW ID')
|
||||||
|
->exampleHeader('NAME PLATE STOP FLOW ID')
|
||||||
|
->example('5'),
|
||||||
ImportColumn::make('created_at')
|
ImportColumn::make('created_at')
|
||||||
->label('CREATED AT')
|
->label('CREATED AT')
|
||||||
->exampleHeader('CREATED AT')
|
->exampleHeader('CREATED AT')
|
||||||
|
|||||||
@@ -875,7 +875,7 @@ class ClassCharacteristicResource extends Resource
|
|||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
}),
|
}),
|
||||||
Forms\Components\TextInput::make('zmm_performance_factor')
|
Forms\Components\TextInput::make('zmm_performance_factor')
|
||||||
->label('ZMM PERFORMANCE_FACTOR')
|
->label('ZMM PERFORMANCE FACTOR')
|
||||||
->reactive()
|
->reactive()
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
@@ -982,45 +982,37 @@ class ClassCharacteristicResource extends Resource
|
|||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
}),
|
}),
|
||||||
Forms\Components\Select::make('is_stopped')
|
// Forms\Components\Select::make('is_stopped')
|
||||||
->label('IS STOPPED')
|
|
||||||
// ->nullable()
|
|
||||||
->selectablePlaceholder(false)
|
|
||||||
->options(function () {
|
|
||||||
return [
|
|
||||||
'0' => 'No',
|
|
||||||
'1' => 'Yes',
|
|
||||||
'2' => 'Yes (Alert Pending)',
|
|
||||||
];
|
|
||||||
})
|
|
||||||
->default('0')
|
|
||||||
->reactive()
|
|
||||||
->afterStateUpdated(function (callable $set) {
|
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
|
||||||
})
|
|
||||||
->required(),
|
|
||||||
Forms\Components\DateTimePicker::make('stopped_datetime')
|
|
||||||
->label('STOPPED DATETIME')
|
|
||||||
->reactive()
|
|
||||||
->placeholder('Select Stopped DateTime')
|
|
||||||
->afterStateUpdated(function (callable $set) {
|
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
|
||||||
}),
|
|
||||||
Forms\Components\TextInput::make('stopped_by')
|
|
||||||
->label('STOPPED BY')
|
|
||||||
->reactive()
|
|
||||||
->readOnly(fn (callable $get) => ! $get('id'))
|
|
||||||
->afterStateUpdated(function (callable $set) {
|
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
|
||||||
}),
|
|
||||||
// Forms\Components\TextInput::make('is_stopped')
|
|
||||||
// ->label('IS STOPPED')
|
// ->label('IS STOPPED')
|
||||||
|
// // ->nullable()
|
||||||
|
// ->selectablePlaceholder(false)
|
||||||
|
// ->options(function () {
|
||||||
|
// return [
|
||||||
|
// '0' => 'No',
|
||||||
|
// '1' => 'Yes',
|
||||||
|
// '2' => 'Yes (Alert Pending)',
|
||||||
|
// ];
|
||||||
|
// })
|
||||||
|
// ->default('0')
|
||||||
// ->reactive()
|
// ->reactive()
|
||||||
// ->afterStateUpdated(function (callable $set) {
|
// ->afterStateUpdated(function (callable $set) {
|
||||||
// $set('updated_by', Filament::auth()->user()?->name);
|
// $set('updated_by', Filament::auth()->user()?->name);
|
||||||
// })
|
// })
|
||||||
// ->default(0)
|
|
||||||
// ->required(),
|
// ->required(),
|
||||||
|
// Forms\Components\DateTimePicker::make('stopped_datetime')
|
||||||
|
// ->label('STOPPED DATETIME')
|
||||||
|
// ->reactive()
|
||||||
|
// ->placeholder('Select Stopped DateTime')
|
||||||
|
// ->afterStateUpdated(function (callable $set) {
|
||||||
|
// $set('updated_by', Filament::auth()->user()?->name);
|
||||||
|
// }),
|
||||||
|
// Forms\Components\TextInput::make('stopped_by')
|
||||||
|
// ->label('STOPPED BY')
|
||||||
|
// ->reactive()
|
||||||
|
// ->readOnly(fn (callable $get) => ! $get('id'))
|
||||||
|
// ->afterStateUpdated(function (callable $set) {
|
||||||
|
// $set('updated_by', Filament::auth()->user()?->name);
|
||||||
|
// }),
|
||||||
Forms\Components\TextInput::make('mark_status')
|
Forms\Components\TextInput::make('mark_status')
|
||||||
->label('MARKED STATUS')
|
->label('MARKED STATUS')
|
||||||
->reactive()
|
->reactive()
|
||||||
@@ -1318,6 +1310,74 @@ class ClassCharacteristicResource extends Resource
|
|||||||
})
|
})
|
||||||
->default(0)
|
->default(0)
|
||||||
->required(),
|
->required(),
|
||||||
|
Forms\Components\Select::make('motor_stop_flow_id')
|
||||||
|
->label('MOTOR STOP FLOW ID')
|
||||||
|
// ->nullable()
|
||||||
|
->selectablePlaceholder(false)
|
||||||
|
->options(function () {
|
||||||
|
return [
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
];
|
||||||
|
})
|
||||||
|
->default('5')
|
||||||
|
->reactive()
|
||||||
|
->afterStateUpdated(function (callable $set) {
|
||||||
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
|
})
|
||||||
|
->required(),
|
||||||
|
// Forms\Components\TextInput::make('motor_stop_flow_id')
|
||||||
|
// ->label('MOTOR STOP FLOW ID')
|
||||||
|
// ->reactive()
|
||||||
|
// ->minValue(1)
|
||||||
|
// ->integer()
|
||||||
|
// ->maxValue(5)
|
||||||
|
// ->afterStateUpdated(function (callable $set) {
|
||||||
|
// $set('updated_by', Filament::auth()->user()?->name);
|
||||||
|
// })
|
||||||
|
// ->default(5)
|
||||||
|
// ->required(),
|
||||||
|
Forms\Components\Select::make('pump_stop_flow_id')
|
||||||
|
->label('PUMP STOP FLOW ID')
|
||||||
|
// ->nullable()
|
||||||
|
->selectablePlaceholder(false)
|
||||||
|
->options(function () {
|
||||||
|
return [
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
];
|
||||||
|
})
|
||||||
|
->default('5')
|
||||||
|
->reactive()
|
||||||
|
->afterStateUpdated(function (callable $set) {
|
||||||
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
|
})
|
||||||
|
->required(),
|
||||||
|
Forms\Components\Select::make('name_plate_stop_flow_id')
|
||||||
|
->label('NAME PLATE STOP FLOW ID')
|
||||||
|
// ->nullable()
|
||||||
|
->selectablePlaceholder(false)
|
||||||
|
->options(function () {
|
||||||
|
return [
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
];
|
||||||
|
})
|
||||||
|
->default('5')
|
||||||
|
->reactive()
|
||||||
|
->afterStateUpdated(function (callable $set) {
|
||||||
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
|
})
|
||||||
|
->required(),
|
||||||
Forms\Components\Hidden::make('created_by')
|
Forms\Components\Hidden::make('created_by')
|
||||||
->label('Created By')
|
->label('Created By')
|
||||||
->default(Filament::auth()->user()?->name),
|
->default(Filament::auth()->user()?->name),
|
||||||
@@ -1931,19 +1991,19 @@ class ClassCharacteristicResource extends Resource
|
|||||||
->label('ZMM AXIAL FORCE')
|
->label('ZMM AXIAL FORCE')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('is_stopped')
|
// Tables\Columns\TextColumn::make('is_stopped')
|
||||||
->label('IS STOPPED')
|
// ->label('IS STOPPED')
|
||||||
->alignCenter()
|
// ->alignCenter()
|
||||||
->formatStateUsing(fn ($state) => ($state == '0') ? 'No' : ($state == '1' ? 'Yes' : 'Yes (Alert Pending)'))
|
// ->formatStateUsing(fn ($state) => ($state == '0') ? 'No' : ($state == '1' ? 'Yes' : 'Yes (Alert Pending)'))
|
||||||
->sortable(),
|
// ->sortable(),
|
||||||
Tables\Columns\TextColumn::make('stopped_datetime')
|
// Tables\Columns\TextColumn::make('stopped_datetime')
|
||||||
->label('STOPPED DATETIME')
|
// ->label('STOPPED DATETIME')
|
||||||
->alignCenter()
|
// ->alignCenter()
|
||||||
->sortable(),
|
// ->sortable(),
|
||||||
Tables\Columns\TextColumn::make('stopped_by')
|
// Tables\Columns\TextColumn::make('stopped_by')
|
||||||
->label('STOPPED BY')
|
// ->label('STOPPED BY')
|
||||||
->alignCenter()
|
// ->alignCenter()
|
||||||
->sortable(),
|
// ->sortable(),
|
||||||
Tables\Columns\TextColumn::make('mark_status')
|
Tables\Columns\TextColumn::make('mark_status')
|
||||||
->label('MARKED STATUS')
|
->label('MARKED STATUS')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
@@ -2035,6 +2095,13 @@ class ClassCharacteristicResource extends Resource
|
|||||||
Tables\Columns\TextColumn::make('motor_pump_pumpset_status')
|
Tables\Columns\TextColumn::make('motor_pump_pumpset_status')
|
||||||
->label('MOTOR PUMP PUMPSET STATUS')
|
->label('MOTOR PUMP PUMPSET STATUS')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'1' => 'Motor',
|
||||||
|
'2' => 'Pump',
|
||||||
|
'3' => 'PumpSet',
|
||||||
|
'4' => 'Name Plate',
|
||||||
|
default => 'NIL',
|
||||||
|
})
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('winded_serial_number')
|
Tables\Columns\TextColumn::make('winded_serial_number')
|
||||||
->label('WINDED SERIAL NUMBER')
|
->label('WINDED SERIAL NUMBER')
|
||||||
@@ -2080,6 +2147,46 @@ class ClassCharacteristicResource extends Resource
|
|||||||
->label('HAS WORK FLOW ID')
|
->label('HAS WORK FLOW ID')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('motor_stop_flow_id')
|
||||||
|
->label('MOTOR STOP FLOW ID')
|
||||||
|
->alignCenter()
|
||||||
|
// ->formatStateUsing(fn ($state) => ($state == '5') ? 'NIL' : ($state == '4' ? 'Has Master' : ($state == '3' ? 'Make Alert' : ($state == '2' ? 'Alert Pending' : ($state == '1' ? 'Alert Approved' : '-')))))
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
default => '-',
|
||||||
|
})
|
||||||
|
->badge()
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('pump_stop_flow_id')
|
||||||
|
->label('PUMP STOP FLOW ID')
|
||||||
|
->alignCenter()
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
default => '-',
|
||||||
|
})
|
||||||
|
->badge()
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('name_plate_stop_flow_id')
|
||||||
|
->label('NAME PLATE STOP FLOW ID')
|
||||||
|
->alignCenter()
|
||||||
|
->formatStateUsing(fn ($state): string => match ((string) $state) {
|
||||||
|
'5' => 'NIL',
|
||||||
|
'4' => 'Has Master',
|
||||||
|
'3' => 'Make Alert',
|
||||||
|
'2' => 'Alert Pending',
|
||||||
|
'1' => 'Alert Approved',
|
||||||
|
default => '-',
|
||||||
|
})
|
||||||
|
->badge()
|
||||||
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('created_at')
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
->label('CREATED AT')
|
->label('CREATED AT')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
|
|||||||
@@ -154,9 +154,6 @@ class ClassCharacteristic extends Model
|
|||||||
'zqmm_qty',
|
'zqmm_qty',
|
||||||
'zmm_operating_temperature',
|
'zmm_operating_temperature',
|
||||||
'zmm_axial_force',
|
'zmm_axial_force',
|
||||||
'is_stopped',
|
|
||||||
'stopped_datetime',
|
|
||||||
'stopped_by',
|
|
||||||
'mark_status',
|
'mark_status',
|
||||||
'marked_physical_count',
|
'marked_physical_count',
|
||||||
'marked_expected_time',
|
'marked_expected_time',
|
||||||
@@ -181,6 +178,7 @@ class ClassCharacteristic extends Model
|
|||||||
'name_plate_marked_by',
|
'name_plate_marked_by',
|
||||||
'motor_pump_pumpset_status',
|
'motor_pump_pumpset_status',
|
||||||
'winded_serial_number',
|
'winded_serial_number',
|
||||||
|
'winded_rework_status',
|
||||||
'motor_machine_name',
|
'motor_machine_name',
|
||||||
'pump_machine_name',
|
'pump_machine_name',
|
||||||
'name_plate_machine_name',
|
'name_plate_machine_name',
|
||||||
@@ -189,7 +187,9 @@ class ClassCharacteristic extends Model
|
|||||||
'samlight_logged_name',
|
'samlight_logged_name',
|
||||||
'pending_released_status',
|
'pending_released_status',
|
||||||
'has_work_flow_id',
|
'has_work_flow_id',
|
||||||
'winded_rework_status',
|
'motor_stop_flow_id',
|
||||||
|
'pump_stop_flow_id',
|
||||||
|
'name_plate_stop_flow_id',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
'created_by',
|
'created_by',
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$sql1 = <<<'SQL'
|
||||||
|
ALTER TABLE class_characteristics
|
||||||
|
DROP COLUMN is_stopped
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql1);
|
||||||
|
|
||||||
|
$sql2 = <<<'SQL'
|
||||||
|
ALTER TABLE class_characteristics
|
||||||
|
DROP COLUMN stopped_datetime
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql2);
|
||||||
|
|
||||||
|
$sql3 = <<<'SQL'
|
||||||
|
ALTER TABLE class_characteristics
|
||||||
|
DROP COLUMN stopped_by
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql3);
|
||||||
|
|
||||||
|
$sql4 = <<<'SQL'
|
||||||
|
ALTER TABLE class_characteristics
|
||||||
|
ADD COLUMN motor_stop_flow_id TEXT DEFAULT '5'
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql4);
|
||||||
|
|
||||||
|
$sql5 = <<<'SQL'
|
||||||
|
ALTER TABLE class_characteristics
|
||||||
|
ADD COLUMN pump_stop_flow_id TEXT DEFAULT '5'
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql5);
|
||||||
|
|
||||||
|
$sql6 = <<<'SQL'
|
||||||
|
ALTER TABLE class_characteristics
|
||||||
|
ADD COLUMN name_plate_stop_flow_id TEXT DEFAULT '5'
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql6);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
// Schema::table('class_characteristics', function (Blueprint $table) {
|
||||||
|
// //
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user