Prevent and remove zero values for billable rates

This commit is contained in:
Constantin Graf
2024-06-10 19:19:51 +02:00
committed by Constantin Graf
parent 92dde6a701
commit bd9cede081
20 changed files with 343 additions and 9 deletions

View File

@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
DB::table('organizations')
->where('billable_rate', '=', 0)
->update(['billable_rate' => null]);
DB::table('project_members')
->where('billable_rate', '=', 0)
->update(['billable_rate' => null]);
DB::table('projects')
->where('billable_rate', '=', 0)
->update(['billable_rate' => null]);
DB::table('members')
->where('billable_rate', '=', 0)
->update(['billable_rate' => null]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};