36 lines
990 B
PHP
36 lines
990 B
PHP
<?php
|
|
|
|
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::create('activities', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->date('due_date')->nullable();
|
|
$table->decimal('amount', 8, 4)->nullable();
|
|
$table->text('note')->default('');
|
|
$table->foreignIdFor(\App\Models\Action::class);
|
|
$table->foreignIdFor(\App\Models\Decision::class);
|
|
$table->foreignIdFor(\App\Models\ClientCase::class);
|
|
$table->foreignIdFor(\App\Models\Contract::class)->nullable();
|
|
$table->softDeletes();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('activities');
|
|
}
|
|
};
|