Added is_imported flag to time entries

This commit is contained in:
Constantin Graf
2024-06-04 14:34:25 +02:00
committed by Constantin Graf
parent 802d9558a3
commit 20f9b344f6
11 changed files with 129 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ class TimeEntryFactory extends Factory
'start' => $start,
'end' => $this->faker->dateTimeBetween($start, 'now'),
'billable' => $this->faker->boolean(),
'is_imported' => false,
'tags' => [],
'user_id' => User::factory(),
'member_id' => Member::factory(),

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
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
{
Schema::table('time_entries', function (Blueprint $table) {
$table->boolean('is_imported')->default(false);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('time_entries', function (Blueprint $table) {
$table->dropColumn('is_imported');
});
}
};