id(); $table->string('day_of_week')->nullable(); $table->date('date')->nullable(); $table->time('start_time'); $table->time('end_time'); $table->boolean('is_active')->default(true); $table->timestamps(); $table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete(); $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete(); $table->index(['day_of_week', 'is_active']); $table->index(['date', 'is_active']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('shifts'); } };