Add spend_time to projects and tasks

This commit is contained in:
Constantin Graf
2024-09-18 22:01:55 +02:00
committed by Gregor Vostrak
parent 2e8da98287
commit bff766d363
14 changed files with 734 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
<?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('projects', function (Blueprint $table): void {
$table->integer('spent_time')->unsigned()->default(0);
});
Schema::table('tasks', function (Blueprint $table): void {
$table->integer('spent_time')->unsigned()->default(0);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('projects', function (Blueprint $table): void {
$table->dropColumn('spent_time');
});
Schema::table('tasks', function (Blueprint $table): void {
$table->dropColumn('spent_time');
});
}
};