Teren-app/database/migrations/2024_11_09_213443_create_activities_table.php
2024-11-14 22:07:01 +01:00

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');
}
};