Kanban / timesheet update
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* The entry's laskutusperuste (fixed / hourly / non_billable, null follows
|
||||
* the job) and an internal comment. The existing note is the billing note.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('time_entries', function (Blueprint $table) {
|
||||
$table->string('billing_model', 20)->nullable()->after('note');
|
||||
$table->text('internal_comment')->nullable()->after('billing_model');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('time_entries', function (Blueprint $table) {
|
||||
$table->dropColumn(['billing_model', 'internal_comment']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Tasks a user has pinned to the "Lukitut työt" part of their time
|
||||
* sheet; they stay from week to week until unpinned.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('time_pinned_tasks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('task_id')->constrained()->cascadeOnDelete();
|
||||
$table->timestamp('pinned_at');
|
||||
$table->unique(['user_id', 'task_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('time_pinned_tasks');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user