phases one of time logged now with log display
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Add seconds precision to helpdesk ticket timer logs.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (! Schema::hasTable('helpdesk_ticket_time_logs')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::table('helpdesk_ticket_time_logs', function (Blueprint $table): void {
|
||||
if (! Schema::hasColumn('helpdesk_ticket_time_logs', 'seconds')) {
|
||||
$table->unsignedInteger('seconds')->default(0)->after('minutes');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove seconds precision from helpdesk ticket timer logs.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
if (! Schema::hasTable('helpdesk_ticket_time_logs')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::table('helpdesk_ticket_time_logs', function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('helpdesk_ticket_time_logs', 'seconds')) {
|
||||
$table->dropColumn('seconds');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user