id(); $table->foreignId('team_id')->constrained('teams')->restrictOnDelete(); $table->string('type', 20); $table->string('title'); $table->dateTime('start_at'); $table->dateTime('end_at')->nullable(); $table->string('status', 20)->default('published'); $table->string('location_name')->nullable(); $table->string('address_text', 500)->nullable(); $table->decimal('location_lat', 10, 7)->nullable(); $table->decimal('location_lng', 10, 7)->nullable(); $table->text('description_html')->nullable(); $table->foreignId('created_by')->constrained('users')->restrictOnDelete(); $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamps(); $table->index(['team_id', 'start_at']); $table->index('start_at'); $table->index('status'); }); } public function down(): void { Schema::dropIfExists('events'); } };